All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2 -net] natsemi: xtensa: fix section mismatch warnings
@ 2021-11-30  6:39 Randy Dunlap
  2021-11-30 14:21 ` Max Filippov
  2021-12-01  2:15 ` Jakub Kicinski
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-11-30  6:39 UTC (permalink / raw)
  To: netdev
  Cc: Randy Dunlap, kernel test robot, Christophe JAILLET, Finn Thain,
	Chris Zankel, Max Filippov, linux-xtensa, Thomas Bogendoerfer,
	David S. Miller, Jakub Kicinski

Fix section mismatch warnings in xtsonic. The first one appears to be
bogus and after fixing the second one, the first one is gone.

WARNING: modpost: vmlinux.o(.text+0x529adc): Section mismatch in reference from the function sonic_get_stats() to the function .init.text:set_reset_devices()
The function sonic_get_stats() references
the function __init set_reset_devices().
This is often because sonic_get_stats lacks a __init 
annotation or the annotation of set_reset_devices is wrong.

WARNING: modpost: vmlinux.o(.text+0x529b3b): Section mismatch in reference from the function xtsonic_probe() to the function .init.text:sonic_probe1()
The function xtsonic_probe() references
the function __init sonic_probe1().
This is often because xtsonic_probe lacks a __init 
annotation or the annotation of sonic_probe1 is wrong.

Fixes: 74f2a5f0ef64 ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: linux-xtensa@linux-xtensa.org
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/ethernet/natsemi/xtsonic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20211129.orig/drivers/net/ethernet/natsemi/xtsonic.c
+++ linux-next-20211129/drivers/net/ethernet/natsemi/xtsonic.c
@@ -120,7 +120,7 @@ static const struct net_device_ops xtson
 	.ndo_set_mac_address	= eth_mac_addr,
 };
 
-static int __init sonic_probe1(struct net_device *dev)
+static int sonic_probe1(struct net_device *dev)
 {
 	unsigned int silicon_revision;
 	struct sonic_local *lp = netdev_priv(dev);

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

* Re: [PATCH 2/2 -net] natsemi: xtensa: fix section mismatch warnings
  2021-11-30  6:39 [PATCH 2/2 -net] natsemi: xtensa: fix section mismatch warnings Randy Dunlap
@ 2021-11-30 14:21 ` Max Filippov
  2021-12-01  2:15 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Max Filippov @ 2021-11-30 14:21 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: netdev, kernel test robot, Christophe JAILLET, Finn Thain,
	Chris Zankel, open list:TENSILICA XTENSA PORT (xtensa),
	Thomas Bogendoerfer, David S. Miller, Jakub Kicinski

On Mon, Nov 29, 2021 at 10:39 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Fix section mismatch warnings in xtsonic. The first one appears to be
> bogus and after fixing the second one, the first one is gone.
>
> WARNING: modpost: vmlinux.o(.text+0x529adc): Section mismatch in reference from the function sonic_get_stats() to the function .init.text:set_reset_devices()
> The function sonic_get_stats() references
> the function __init set_reset_devices().
> This is often because sonic_get_stats lacks a __init
> annotation or the annotation of set_reset_devices is wrong.
>
> WARNING: modpost: vmlinux.o(.text+0x529b3b): Section mismatch in reference from the function xtsonic_probe() to the function .init.text:sonic_probe1()
> The function xtsonic_probe() references
> the function __init sonic_probe1().
> This is often because xtsonic_probe lacks a __init
> annotation or the annotation of sonic_probe1 is wrong.
>
> Fixes: 74f2a5f0ef64 ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.")

The original code had the __devinit attribute
for the function xtsonic_probe, it then was dropped in change
6980cbe4a6db ("natsemi: remove __dev* attributes").
I'd say that this is the change that this patch fixes.

> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> ---
>  drivers/net/ethernet/natsemi/xtsonic.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Max Filippov <jcmvbkbc@gmail.com>

-- 
Thanks.
-- Max

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

* Re: [PATCH 2/2 -net] natsemi: xtensa: fix section mismatch warnings
  2021-11-30  6:39 [PATCH 2/2 -net] natsemi: xtensa: fix section mismatch warnings Randy Dunlap
  2021-11-30 14:21 ` Max Filippov
@ 2021-12-01  2:15 ` Jakub Kicinski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-12-01  2:15 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: netdev, kernel test robot, Christophe JAILLET, Finn Thain,
	Chris Zankel, Max Filippov, linux-xtensa, Thomas Bogendoerfer,
	David S. Miller

On Mon, 29 Nov 2021 22:39:47 -0800 Randy Dunlap wrote:
> Fix section mismatch warnings in xtsonic. The first one appears to be
> bogus and after fixing the second one, the first one is gone.
> 
> WARNING: modpost: vmlinux.o(.text+0x529adc): Section mismatch in reference from the function sonic_get_stats() to the function .init.text:set_reset_devices()
> The function sonic_get_stats() references
> the function __init set_reset_devices().
> This is often because sonic_get_stats lacks a __init 
> annotation or the annotation of set_reset_devices is wrong.
> 
> WARNING: modpost: vmlinux.o(.text+0x529b3b): Section mismatch in reference from the function xtsonic_probe() to the function .init.text:sonic_probe1()
> The function xtsonic_probe() references
> the function __init sonic_probe1().
> This is often because xtsonic_probe lacks a __init 
> annotation or the annotation of sonic_probe1 is wrong.
> 
> Fixes: 74f2a5f0ef64 ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>

Applied this one to net and I'll take Max's patch for dev_addr 
to net-next. Thanks!

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

end of thread, other threads:[~2021-12-01  2:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30  6:39 [PATCH 2/2 -net] natsemi: xtensa: fix section mismatch warnings Randy Dunlap
2021-11-30 14:21 ` Max Filippov
2021-12-01  2:15 ` Jakub Kicinski

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.