netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static
@ 2023-08-10 12:25 Arnd Bergmann
  2023-08-10 12:25 ` [PATCH 2/2] ethernet: atarilance: mark init function static Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-08-10 12:25 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Arnd Bergmann, Geoff Levand, Petr Machata, Piotr Raczynski,
	Wolfram Sang, Liang He, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The function is exported for no reason and should just be static:

drivers/net/ethernet/sun/ldmvsw.c:127:5: error: no previous prototype for 'ldmvsw_open' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/sun/ldmvsw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c
index 734a817d3c945..a9a6670b5ff1f 100644
--- a/drivers/net/ethernet/sun/ldmvsw.c
+++ b/drivers/net/ethernet/sun/ldmvsw.c
@@ -124,7 +124,7 @@ static void vsw_set_rx_mode(struct net_device *dev)
 	return sunvnet_set_rx_mode_common(dev, port->vp);
 }
 
-int ldmvsw_open(struct net_device *dev)
+static int ldmvsw_open(struct net_device *dev)
 {
 	struct vnet_port *port = netdev_priv(dev);
 	struct vio_driver_state *vio = &port->vio;
@@ -136,7 +136,6 @@ int ldmvsw_open(struct net_device *dev)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(ldmvsw_open);
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void vsw_poll_controller(struct net_device *dev)
-- 
2.39.2


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

* [PATCH 2/2] ethernet: atarilance: mark init function static
  2023-08-10 12:25 [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Arnd Bergmann
@ 2023-08-10 12:25 ` Arnd Bergmann
  2023-08-10 12:50   ` Yang Yingliang
  2023-08-10 20:46 ` [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Simon Horman
  2023-08-12  1:50 ` patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2023-08-10 12:25 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Arnd Bergmann, Haoyue Xu, Guofeng Yue, Yang Yingliang, netdev,
	linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The init function is only referenced locally, so it should be static to
avoid this warning:

drivers/net/ethernet/amd/atarilance.c:370:28: error: no previous prototype for 'atarilance_probe' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/amd/atarilance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index ec704222925d8..751454d305c64 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -367,7 +367,7 @@ static void *slow_memcpy( void *dst, const void *src, size_t len )
 }
 
 
-struct net_device * __init atarilance_probe(void)
+static struct net_device * __init atarilance_probe(void)
 {
 	int i;
 	static int found;
-- 
2.39.2


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

* Re: [PATCH 2/2] ethernet: atarilance: mark init function static
  2023-08-10 12:25 ` [PATCH 2/2] ethernet: atarilance: mark init function static Arnd Bergmann
@ 2023-08-10 12:50   ` Yang Yingliang
  0 siblings, 0 replies; 5+ messages in thread
From: Yang Yingliang @ 2023-08-10 12:50 UTC (permalink / raw)
  To: Arnd Bergmann, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: Arnd Bergmann, Haoyue Xu, Guofeng Yue, netdev, linux-kernel


On 2023/8/10 20:25, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The init function is only referenced locally, so it should be static to
> avoid this warning:
>
> drivers/net/ethernet/amd/atarilance.c:370:28: error: no previous prototype for 'atarilance_probe' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Yang Yingliang <yangyingliang@huawei.com>

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

* Re: [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static
  2023-08-10 12:25 [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Arnd Bergmann
  2023-08-10 12:25 ` [PATCH 2/2] ethernet: atarilance: mark init function static Arnd Bergmann
@ 2023-08-10 20:46 ` Simon Horman
  2023-08-12  1:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2023-08-10 20:46 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Arnd Bergmann, Geoff Levand, Petr Machata, Piotr Raczynski,
	Wolfram Sang, Liang He, netdev, linux-kernel

On Thu, Aug 10, 2023 at 02:25:15PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The function is exported for no reason and should just be static:
> 
> drivers/net/ethernet/sun/ldmvsw.c:127:5: error: no previous prototype for 'ldmvsw_open' [-Werror=missing-prototypes]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Simon Horman <horms@kernel.org> # build-tested

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

* Re: [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static
  2023-08-10 12:25 [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Arnd Bergmann
  2023-08-10 12:25 ` [PATCH 2/2] ethernet: atarilance: mark init function static Arnd Bergmann
  2023-08-10 20:46 ` [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Simon Horman
@ 2023-08-12  1:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-08-12  1:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: davem, edumazet, kuba, pabeni, arnd, geoff, petrm,
	piotr.raczynski, wsa+renesas, windhl, netdev, linux-kernel

Hello:

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

On Thu, 10 Aug 2023 14:25:15 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The function is exported for no reason and should just be static:
> 
> drivers/net/ethernet/sun/ldmvsw.c:127:5: error: no previous prototype for 'ldmvsw_open' [-Werror=missing-prototypes]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> [...]

Here is the summary with links:
  - [1/2] ethernet: ldmvsw: mark ldmvsw_open() static
    https://git.kernel.org/netdev/net-next/c/ea6f782fe584
  - [2/2] ethernet: atarilance: mark init function static
    https://git.kernel.org/netdev/net-next/c/7191c140faa2

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

end of thread, other threads:[~2023-08-12  1:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 12:25 [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Arnd Bergmann
2023-08-10 12:25 ` [PATCH 2/2] ethernet: atarilance: mark init function static Arnd Bergmann
2023-08-10 12:50   ` Yang Yingliang
2023-08-10 20:46 ` [PATCH 1/2] ethernet: ldmvsw: mark ldmvsw_open() static Simon Horman
2023-08-12  1:50 ` 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).