public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: macb: fix use of at91_default_usrio without CONFIG_OF
@ 2026-03-31 13:10 Conor Dooley
  2026-04-02  3:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Conor Dooley @ 2026-03-31 13:10 UTC (permalink / raw)
  To: netdev
  Cc: conor, Conor Dooley, kernel test robot, Jiawen Wu, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Nicolas Ferre, Claudiu Beznea, devicetree, linux-kernel,
	linux-riscv

From: Conor Dooley <conor.dooley@microchip.com>

If CONFIG_OF is not enabled, at91_default_usrio is used undeclared in
gem_default_config. Move at91_default_usrio back above the CONFIG_OF
section where macb_default_usrio used to be, so that it is unconditionally
defined and defined prior to any of the users.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603280028.wQjUrIvv-lkp@intel.com/
Reported-by: Jiawen Wu <jiawenwu@trustnetic.com>
Closes: https://lore.kernel.org/all/06a701dcc014$86def5b0$949ce110$@trustnetic.com/
Fixes: a17871778ee28 ("net: macb: rename macb_default_usrio to at91_default_usrio as not all platforms have mii mode control in usrio")
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
lkp also reported this over the weekend, but against the dev copy in my
tree. I had thought that CONFIG_OF was standard off on x86, but I guess
it isn't, given lkp didn't catch it until randconfigs.

Seem to have come down with some sort of bug, hopefully I haven't cocked
this v2 up somehow in my addled state.

v2:
- Do the boring thing that works... Probably worth a revisit later, cos
  there's a bunch of confusing naming here still - "default_gem_config"
  is used for cdns,macb and of course "at91_default_usrio" is used on
  things where I am reasonably confident it shouldn't, like the Xilinx
  boards.

CC: Andrew Lunn <andrew+netdev@lunn.ch>
CC: David S. Miller <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Nicolas Ferre <nicolas.ferre@microchip.com>
CC: Claudiu Beznea <claudiu.beznea@tuxon.dev>
CC: netdev@vger.kernel.org
CC: devicetree@vger.kernel.org
CC: linux-kernel@vger.kernel.org
CC: linux-riscv@lists.infradead.org
---
 drivers/net/ethernet/cadence/macb_main.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 12e2b2f4aaf88..3e37b0a3e7e4b 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4949,6 +4949,13 @@ static int macb_init(struct platform_device *pdev,
 		return macb_init_dflt(pdev);
 }
 
+static const struct macb_usrio_config at91_default_usrio = {
+	.mii = MACB_BIT(MII),
+	.rmii = MACB_BIT(RMII),
+	.rgmii = GEM_BIT(RGMII),
+	.clken = MACB_BIT(CLKEN),
+};
+
 #if defined(CONFIG_OF)
 /* 1518 rounded up */
 #define AT91ETHER_MAX_RBUFF_SZ	0x600
@@ -5523,13 +5530,6 @@ static int eyeq5_init(struct platform_device *pdev)
 	return ret;
 }
 
-static const struct macb_usrio_config at91_default_usrio = {
-	.mii = MACB_BIT(MII),
-	.rmii = MACB_BIT(RMII),
-	.rgmii = GEM_BIT(RGMII),
-	.clken = MACB_BIT(CLKEN),
-};
-
 static const struct macb_usrio_config mpfs_usrio = {
 	.tsu_source = 0,
 };
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v2] net: macb: fix use of at91_default_usrio without CONFIG_OF
  2026-03-31 13:10 [PATCH net-next v2] net: macb: fix use of at91_default_usrio without CONFIG_OF Conor Dooley
@ 2026-04-02  3:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-02  3:30 UTC (permalink / raw)
  To: Conor Dooley
  Cc: netdev, conor.dooley, lkp, jiawenwu, andrew+netdev, davem,
	edumazet, kuba, pabeni, nicolas.ferre, claudiu.beznea, devicetree,
	linux-kernel, linux-riscv

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 31 Mar 2026 14:10:21 +0100 you wrote:
> From: Conor Dooley <conor.dooley@microchip.com>
> 
> If CONFIG_OF is not enabled, at91_default_usrio is used undeclared in
> gem_default_config. Move at91_default_usrio back above the CONFIG_OF
> section where macb_default_usrio used to be, so that it is unconditionally
> defined and defined prior to any of the users.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: macb: fix use of at91_default_usrio without CONFIG_OF
    https://git.kernel.org/netdev/net-next/c/cee10a01e286

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-02  3:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 13:10 [PATCH net-next v2] net: macb: fix use of at91_default_usrio without CONFIG_OF Conor Dooley
2026-04-02  3:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox