]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net: dsa: ksz: Remove dead code and fix warnings
authorMarek Vasut <marex@denx.de>
Tue, 6 Aug 2019 13:06:07 +0000 (15:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Aug 2019 18:59:17 +0000 (11:59 -0700)
Remove ksz_port_cleanup(), which is unused. Add missing include
"ksz_common.h", which fixes the following warning when built with
make ... W=1

drivers/net/dsa/microchip/ksz_common.c:23:6: warning: no previous prototype for ‘...’ [-Wmissing-prototypes]

Note that the order of the headers cannot be swapped, as that would
trigger missing forward declaration errors, which would indicate the
way forward is to merge the two headers into one.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: David S. Miller <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Tristram Ha <Tristram.Ha@microchip.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Woojung Huh <woojung.huh@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h

index ce20cc90f9ef861dac40995ea93cf45a9ed0bf1d..a1e6e560fde8a159525a3a928a91ca18384e45b3 100644 (file)
 #include <net/switchdev.h>
 
 #include "ksz_priv.h"
-
-void ksz_port_cleanup(struct ksz_device *dev, int port)
-{
-       /* Common code for port cleanup. */
-       mutex_lock(&dev->dev_mutex);
-       dev->on_ports &= ~(1 << port);
-       dev->live_ports &= ~(1 << port);
-       mutex_unlock(&dev->dev_mutex);
-}
-EXPORT_SYMBOL_GPL(ksz_port_cleanup);
+#include "ksz_common.h"
 
 void ksz_update_port_member(struct ksz_device *dev, int port)
 {
index 84fed4a2578bf5a0b195edb2a784714a21da4ab3..9f9ff0fb3b53a4ce9d221d987e853383dab0889b 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <linux/regmap.h>
 
-void ksz_port_cleanup(struct ksz_device *dev, int port);
 void ksz_update_port_member(struct ksz_device *dev, int port);
 void ksz_init_mib_timer(struct ksz_device *dev);