From: Mark Brown <broonie@kernel.org>
To: Kishon Vijay Abraham I <kishon@kernel.org>,
Vinod Koul <vkoul@kernel.org>
Cc: Kees Cook <kees@kernel.org>, Kees Cook <kees+treewide@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Rosen Penev <rosenp@gmail.com>
Subject: linux-next: manual merge of the phy-next tree with the origin tree
Date: Thu, 12 Nov 2026 16:00:18 +0000 [thread overview]
Message-ID: <avXijqnyZv1ALU1j@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]
Hi all,
Today's linux-next merge of the phy-next tree got a conflict in:
drivers/phy/mediatek/phy-mtk-tphy.c
between commit:
4dd10fbbeb9c3 ("treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family")
from the origin tree and commit:
6d4333dfb6057 ("phy: mediatek: tphy: simplify main allocation")
from the phy-next tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --combined drivers/phy/mediatek/phy-mtk-tphy.c
index 22273a4df9b25,e9b9e667b3195..0000000000000
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@@ -340,10 -340,10 +340,10 @@@ struct mtk_tphy
struct device *dev;
void __iomem *sif_base; /* only shared sif */
const struct mtk_phy_pdata *pdata;
- struct mtk_phy_instance **phys;
- int nphys;
int src_ref_clk; /* MHZ, reference clock for slew rate calibrate */
int src_coef; /* coefficient for slew rate calibrate */
+ int nphys;
+ struct mtk_phy_instance *phys[] __counted_by(nphys);
};
#if IS_ENABLED(CONFIG_DEBUG_FS)
@@@ -1572,21 -1572,19 +1572,19 @@@ static int mtk_tphy_probe(struct platfo
struct mtk_tphy *tphy;
struct resource res;
int port, ret;
+ size_t nphys;
- tphy = devm_kzalloc_obj(dev, *tphy);
+ nphys = of_get_child_count(np);
+ tphy = devm_kzalloc(dev, struct_size(tphy, phys, nphys), GFP_KERNEL);
if (!tphy)
return -ENOMEM;
+ tphy->nphys = nphys;
+ tphy->dev = dev;
tphy->pdata = of_device_get_match_data(dev);
if (!tphy->pdata)
return -EINVAL;
- tphy->nphys = of_get_child_count(np);
- tphy->phys = devm_kzalloc_objs(dev, *tphy->phys, tphy->nphys);
- if (!tphy->phys)
- return -ENOMEM;
-
- tphy->dev = dev;
platform_set_drvdata(pdev, tphy);
sif_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@@ -1617,7 -1615,7 +1615,7 @@@
struct phy *phy;
int retval;
- instance = devm_kzalloc(dev, sizeof(*instance), GFP_KERNEL);
+ instance = devm_kzalloc_obj(dev, *instance);
if (!instance)
return -ENOMEM;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
reply other threads:[~2026-11-12 16:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=avXijqnyZv1ALU1j@sirena.org.uk \
--to=broonie@kernel.org \
--cc=kees+treewide@kernel.org \
--cc=kees@kernel.org \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rosenp@gmail.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®