All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [net-next] net: enetc: fix link error again
@ 2021-04-22 13:35 Arnd Bergmann
  2021-04-22 15:14 ` Vladimir Oltean
  2021-04-22 20:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-04-22 13:35 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Arnd Bergmann, Vladimir Oltean
  Cc: netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

A link time bug that I had fixed before has come back now that
another sub-module was added to the enetc driver:

ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!

The problem is that the enetc Makefile is not actually used for
the ierb module if that is the only built-in driver in there
and everything else is a loadable module.

Fix it by always entering the directory this time, regardless
of which symbols are configured. This should reliably fix the
problem and prevent it from coming back another time.

Fixes: 112463ddbe82 ("net: dsa: felix: fix link error")
Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/freescale/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile
index 67c436400352..de7b31842233 100644
--- a/drivers/net/ethernet/freescale/Makefile
+++ b/drivers/net/ethernet/freescale/Makefile
@@ -24,6 +24,4 @@ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/
 
 obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/
 
-obj-$(CONFIG_FSL_ENETC) += enetc/
-obj-$(CONFIG_FSL_ENETC_MDIO) += enetc/
-obj-$(CONFIG_FSL_ENETC_VF) += enetc/
+obj-y += enetc/
-- 
2.29.2


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

* Re: [PATCH] [net-next] net: enetc: fix link error again
  2021-04-22 13:35 [PATCH] [net-next] net: enetc: fix link error again Arnd Bergmann
@ 2021-04-22 15:14 ` Vladimir Oltean
  2021-04-22 15:22   ` Arnd Bergmann
  2021-04-22 20:30 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Vladimir Oltean @ 2021-04-22 15:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Jakub Kicinski, Arnd Bergmann, Vladimir Oltean,
	netdev, linux-kernel, Michael Walle, Claudiu Manoil

On Thu, Apr 22, 2021 at 03:35:11PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> A link time bug that I had fixed before has come back now that
> another sub-module was added to the enetc driver:
> 
> ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!
> 
> The problem is that the enetc Makefile is not actually used for
> the ierb module if that is the only built-in driver in there
> and everything else is a loadable module.
> 
> Fix it by always entering the directory this time, regardless
> of which symbols are configured. This should reliably fix the
> problem and prevent it from coming back another time.
> 
> Fixes: 112463ddbe82 ("net: dsa: felix: fix link error")
> Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/net/ethernet/freescale/Makefile | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/Makefile b/drivers/net/ethernet/freescale/Makefile
> index 67c436400352..de7b31842233 100644
> --- a/drivers/net/ethernet/freescale/Makefile
> +++ b/drivers/net/ethernet/freescale/Makefile
> @@ -24,6 +24,4 @@ obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/
>  
>  obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/
>  
> -obj-$(CONFIG_FSL_ENETC) += enetc/
> -obj-$(CONFIG_FSL_ENETC_MDIO) += enetc/
> -obj-$(CONFIG_FSL_ENETC_VF) += enetc/
> +obj-y += enetc/
> -- 
> 2.29.2
> 

I feel so bad that I'm incapable of troubleshooting even the most
elementary Kconfig issues... I did not even once think of opening that
Makefile.

Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>

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

* Re: [PATCH] [net-next] net: enetc: fix link error again
  2021-04-22 15:14 ` Vladimir Oltean
@ 2021-04-22 15:22   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2021-04-22 15:22 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: David S. Miller, Jakub Kicinski, Vladimir Oltean, Networking,
	Linux Kernel Mailing List, Michael Walle, Claudiu Manoil

On Thu, Apr 22, 2021 at 5:15 PM Vladimir Oltean <olteanv@gmail.com> wrote:
>> The problem is that the enetc Makefile is not actually used for
>> the ierb module if that is the only built-in driver in there
>> and everything else is a loadable module.
>
> I feel so bad that I'm incapable of troubleshooting even the most
> elementary Kconfig issues... I did not even once think of opening that
> Makefile.
>
> Acked-by: Vladimir Oltean <vladimir.oltean@nxp.com>

No worries, this is a particularly nasty way Kconfig can go wrong, I thing
most kernel developers would struggle with this.

       Arnd

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

* Re: [PATCH] [net-next] net: enetc: fix link error again
  2021-04-22 13:35 [PATCH] [net-next] net: enetc: fix link error again Arnd Bergmann
  2021-04-22 15:14 ` Vladimir Oltean
@ 2021-04-22 20:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-22 20:30 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: davem, kuba, arnd, vladimir.oltean, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Thu, 22 Apr 2021 15:35:11 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> A link time bug that I had fixed before has come back now that
> another sub-module was added to the enetc driver:
> 
> ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined!
> 
> [...]

Here is the summary with links:
  - [net-next] net: enetc: fix link error again
    https://git.kernel.org/netdev/net-next/c/74c97ea3b61e

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] 4+ messages in thread

end of thread, other threads:[~2021-04-22 20:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 13:35 [PATCH] [net-next] net: enetc: fix link error again Arnd Bergmann
2021-04-22 15:14 ` Vladimir Oltean
2021-04-22 15:22   ` Arnd Bergmann
2021-04-22 20:30 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.