From: Randy Dunlap <[email protected]>
Fix build errors in Mediatek mtk_eth_soc driver.
It looks like these 3 source files were meant to be linked together
since 2 of them are library-like functions,
but they are currently being built as 3 loadable modules.
Fixes these build errors:
WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/mediatek/mtk_eth_path.o
WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/mediatek/mtk_sgmii.o
ERROR: "mtk_sgmii_init" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
ERROR: "mtk_setup_hw_path" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
ERROR: "mtk_sgmii_setup_mode_force" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
ERROR: "mtk_sgmii_setup_mode_an" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
ERROR: "mtk_w32" [drivers/net/ethernet/mediatek/mtk_eth_path.ko] undefined!
ERROR: "mtk_r32" [drivers/net/ethernet/mediatek/mtk_eth_path.ko] undefined!
This changes the loadable module name from mtk_eth_soc to mtk_eth.
I didn't see a way to leave it as mtk_eth_soc.
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Randy Dunlap <[email protected]>
Cc: Sean Wang <[email protected]>
Cc: John Crispin <[email protected]>
Cc: Felix Fietkau <[email protected]>
Cc: Nelson Chang <[email protected]>
---
drivers/net/ethernet/mediatek/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20190604.orig/drivers/net/ethernet/mediatek/Makefile
+++ linux-next-20190604/drivers/net/ethernet/mediatek/Makefile
@@ -3,5 +3,5 @@
# Makefile for the Mediatek SoCs built-in ethernet macs
#
-obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth_soc.o mtk_sgmii.o \
- mtk_eth_path.o
+obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth.o
+mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o
Hi Randy,
Thanks for your help. But it seems I've already made the same fixup for the problem in http://lists.infradead.org/pipermail/linux-mediatek/2019-June/020301.html
as soon as the kbuild test robot reported this.
Sean
On Tue, 2019-06-04 at 22:52 -0700, Randy Dunlap wrote:
> From: Randy Dunlap <[email protected]>
>
> Fix build errors in Mediatek mtk_eth_soc driver.
>
> It looks like these 3 source files were meant to be linked together
> since 2 of them are library-like functions,
> but they are currently being built as 3 loadable modules.
>
> Fixes these build errors:
>
> WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/mediatek/mtk_eth_path.o
> WARNING: modpost: missing MODULE_LICENSE() in drivers/net/ethernet/mediatek/mtk_sgmii.o
> ERROR: "mtk_sgmii_init" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
> ERROR: "mtk_setup_hw_path" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
> ERROR: "mtk_sgmii_setup_mode_force" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
> ERROR: "mtk_sgmii_setup_mode_an" [drivers/net/ethernet/mediatek/mtk_eth_soc.ko] undefined!
> ERROR: "mtk_w32" [drivers/net/ethernet/mediatek/mtk_eth_path.ko] undefined!
> ERROR: "mtk_r32" [drivers/net/ethernet/mediatek/mtk_eth_path.ko] undefined!
>
> This changes the loadable module name from mtk_eth_soc to mtk_eth.
> I didn't see a way to leave it as mtk_eth_soc.
>
> Reported-by: kbuild test robot <[email protected]>
> Signed-off-by: Randy Dunlap <[email protected]>
> Cc: Sean Wang <[email protected]>
> Cc: John Crispin <[email protected]>
> Cc: Felix Fietkau <[email protected]>
> Cc: Nelson Chang <[email protected]>
> ---
> drivers/net/ethernet/mediatek/Makefile | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- linux-next-20190604.orig/drivers/net/ethernet/mediatek/Makefile
> +++ linux-next-20190604/drivers/net/ethernet/mediatek/Makefile
> @@ -3,5 +3,5 @@
> # Makefile for the Mediatek SoCs built-in ethernet macs
> #
>
> -obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth_soc.o mtk_sgmii.o \
> - mtk_eth_path.o
> +obj-$(CONFIG_NET_MEDIATEK_SOC) += mtk_eth.o
> +mtk_eth-y := mtk_eth_soc.o mtk_sgmii.o mtk_eth_path.o
>
>
From: Sean Wang <[email protected]>
Date: Wed, 5 Jun 2019 17:19:29 +0800
> Thanks for your help. But it seems I've already made the same fixup
> for the problem in
> http://lists.infradead.org/pipermail/linux-mediatek/2019-June/020301.html
> as soon as the kbuild test robot reported this.
No, that's not how this works.
You fix networking build fixes by sending the fix here to netdev.
Randy submitted the fix properly, so I'm applying his patch to my
tree.