Skip to contentSkip to conversation

ethernet: ldmvsw: mark ldmvsw_open() static

PATCH Applied Arnd Bergmann 4 participants 5 messages Aug 10, 2023 – Aug 12, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ethernet: ldmvsw: mark ldmvsw_open() static

From: Arnd Bergmann <[email protected]>

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]

---
 drivers/net/ethernet/sun/ldmvsw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/sun/ldmvsw.c +1 -2
index 734a817d3c945..a9a6670b5ff1f 100644
@@ -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)
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 ethernet: atarilance: mark init function static

From: Arnd Bergmann <[email protected]>

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]

---
 drivers/net/ethernet/amd/atarilance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amd/atarilance.c +1 -1
index ec704222925d8..751454d305c64 100644
@@ -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;
Signature · 1 line
2.39.2
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ethernet: atarilance: mark init function static

Quoted 8 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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]

reviewer Reviewed-by Tested-by on v1 1/2
#3 lore raw
In reply to Arnd Bergmann
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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]

#4 lore raw
In reply to Arnd Bergmann
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Thu, 10 Aug 2023 14:25:15 +0200 you wrote:

From: Arnd Bergmann <[email protected]>

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]

[...]

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!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html