Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>
Cc: lee@kernel.org, Frank.Li@kernel.org, imx@lists.linux.dev,
	mfd@lists.linux.dev
Subject: Re: [PATCH 4/8] net: bcmgenet: use platform_device_set_fwnode()
Date: Tue, 21 Jul 2026 09:26:03 +0000	[thread overview]
Message-ID: <20260721092605.16FD41F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260720-pdev-set-fwnode-instead-of-of-node-v1-4-2dee93f42c54@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The static function `bcmgenet_mii_of_find_mdio()` becomes completely unreferenced and triggers a compiler warning (`-Wunused-function`) when `CONFIG_OF` is disabled.
--

--- Patch [4]: [PATCH 4/8] net: bcmgenet: use platform_device_set_fwnode() ---
commit 91caf438269ceae68bf14d692c72b6702b3b3004
Author: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

net: bcmgenet: use platform_device_set_fwnode()

This patch changes dynamically allocated platform devices to use the
higher-level platform_device_set_fwnode() rather than the OF-specific
platform_device_set_of_node().

> diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
> index 0f0dbabfaabbc..6f471723bd53f 100644
> --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
> +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
[ ... ]
> @@ -492,7 +492,8 @@ static int bcmgenet_mii_register(struct bcmgenet_priv *priv)
>  	ppdev->dev.parent = &pdev->dev;
>  
>  	if (dn)
> -		platform_device_set_of_node(ppdev, bcmgenet_mii_of_find_mdio(priv));
> +		platform_device_set_fwnode(ppdev,
> +					   of_fwnode_handle(bcmgenet_mii_of_find_mdio(priv)));

[Severity: Low]
Will this cause a -Wunused-function warning for bcmgenet_mii_of_find_mdio()
when CONFIG_OF is disabled?

When CONFIG_OF is not set, include/linux/of.h defines of_fwnode_handle(node)
as just NULL. Because the macro discards its argument during preprocessing,
the call to bcmgenet_mii_of_find_mdio() is completely dropped, leaving the
static function unreferenced in this configuration.

Should bcmgenet_mii_of_find_mdio() be marked with __maybe_unused to prevent
build failures on setups using -Werror?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260720-pdev-set-fwnode-instead-of-of-node-v1-0-2dee93f42c54@oss.qualcomm.com?part=4

  parent reply	other threads:[~2026-07-21  9:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  9:24 [PATCH 0/8] driver core: prefer platform_device_set_fwnode() Bartosz Golaszewski
2026-07-20  9:24 ` [PATCH 1/8] powerpc/powermac: use platform_device_set_fwnode() Bartosz Golaszewski
2026-07-21  9:25   ` sashiko-bot
2026-07-20  9:24 ` [PATCH 2/8] i2c: pxa-pci: " Bartosz Golaszewski
2026-07-20  9:41   ` Wolfram Sang
2026-07-21  9:26   ` sashiko-bot
2026-07-20  9:24 ` [PATCH 3/8] iommu/fsl: " Bartosz Golaszewski
2026-07-20 12:58   ` Robin Murphy
2026-07-20 13:39     ` Bartosz Golaszewski
2026-07-20 14:34       ` Robin Murphy
2026-07-20 14:34   ` Frank Li
2026-07-21  9:26   ` sashiko-bot
2026-07-20  9:24 ` [PATCH 4/8] net: bcmgenet: " Bartosz Golaszewski
2026-07-20 14:38   ` Andrew Lunn
2026-07-20 16:57     ` Florian Fainelli
2026-07-21  9:26   ` sashiko-bot [this message]
2026-07-20  9:24 ` [PATCH 5/8] pmdomain: imx: " Bartosz Golaszewski
2026-07-20 14:34   ` Frank Li
2026-07-21  9:26   ` sashiko-bot
2026-07-20  9:24 ` [PATCH 6/8] mfd: tps6586: " Bartosz Golaszewski
2026-07-21  9:26   ` sashiko-bot
2026-07-20  9:24 ` [PATCH 7/8] net: mv643xx: " Bartosz Golaszewski
2026-07-20 14:43   ` Andrew Lunn
2026-07-20 16:01     ` Bartosz Golaszewski
2026-07-20 18:28       ` Andrew Lunn
2026-07-21  7:57         ` Bartosz Golaszewski
2026-07-21  9:26   ` sashiko-bot
2026-07-20  9:24 ` [PATCH 8/8] slimbus: qcom-ngd-ctrl: " Bartosz Golaszewski
2026-07-21  9:26   ` sashiko-bot

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=20260721092605.16FD41F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=imx@lists.linux.dev \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /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