linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: of: fix stub of_net helpers for CONFIG_NET=n
@ 2021-10-14  9:00 Arnd Bergmann
  2021-10-14 23:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-10-14  9:00 UTC (permalink / raw)
  To: Jakub Kicinski, David S. Miller
  Cc: Arnd Bergmann, Rob Herring, Frank Rowand, Andrew Lunn,
	Michael Walle, devicetree, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Moving the of_net code from drivers/of/ to net/core means we
no longer stub out the helpers when networking is disabled,
which leads to a randconfig build failure with at least one
ARM platform that calls this from non-networking code:

arm-linux-gnueabi-ld: arch/arm/mach-mvebu/kirkwood.o: in function `kirkwood_dt_eth_fixup':
kirkwood.c:(.init.text+0x54): undefined reference to `of_get_mac_address'

Restore the way this worked before by changing that #ifdef
check back to testing for both CONFIG_OF and CONFIG_NET.

Fixes: e330fb14590c ("of: net: move of_net under net/")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/of_net.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of_net.h b/include/linux/of_net.h
index 0797e2edb8c2..0484b613ca64 100644
--- a/include/linux/of_net.h
+++ b/include/linux/of_net.h
@@ -8,7 +8,7 @@
 
 #include <linux/phy.h>
 
-#ifdef CONFIG_OF
+#if defined(CONFIG_OF) && defined(CONFIG_NET)
 #include <linux/of.h>
 
 struct net_device;
-- 
2.29.2


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

* Re: [PATCH net-next] net: of: fix stub of_net helpers for CONFIG_NET=n
  2021-10-14  9:00 [PATCH net-next] net: of: fix stub of_net helpers for CONFIG_NET=n Arnd Bergmann
@ 2021-10-14 23:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-10-14 23:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: kuba, davem, arnd, robh+dt, frowand.list, andrew, michael,
	devicetree, netdev, linux-kernel

Hello:

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

On Thu, 14 Oct 2021 11:00:37 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Moving the of_net code from drivers/of/ to net/core means we
> no longer stub out the helpers when networking is disabled,
> which leads to a randconfig build failure with at least one
> ARM platform that calls this from non-networking code:
> 
> [...]

Here is the summary with links:
  - [net-next] net: of: fix stub of_net helpers for CONFIG_NET=n
    https://git.kernel.org/netdev/net-next/c/8b017fbe0bbb

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:[~2021-10-14 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14  9:00 [PATCH net-next] net: of: fix stub of_net helpers for CONFIG_NET=n Arnd Bergmann
2021-10-14 23:00 ` 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;
as well as URLs for NNTP newsgroup(s).