Skip to content

Commit ffc60b5

Browse files
Marek Vasutdavem330
authored andcommitted
net: dsa: ksz: Remove dead code and fix warnings
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>
1 parent 0dfa0be commit ffc60b5

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

drivers/net/dsa/microchip/ksz_common.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,7 @@
1919
#include <net/switchdev.h>
2020

2121
#include "ksz_priv.h"
22-
23-
void ksz_port_cleanup(struct ksz_device *dev, int port)
24-
{
25-
/* Common code for port cleanup. */
26-
mutex_lock(&dev->dev_mutex);
27-
dev->on_ports &= ~(1 << port);
28-
dev->live_ports &= ~(1 << port);
29-
mutex_unlock(&dev->dev_mutex);
30-
}
31-
EXPORT_SYMBOL_GPL(ksz_port_cleanup);
22+
#include "ksz_common.h"
3223

3324
void ksz_update_port_member(struct ksz_device *dev, int port)
3425
{

drivers/net/dsa/microchip/ksz_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include <linux/regmap.h>
1111

12-
void ksz_port_cleanup(struct ksz_device *dev, int port);
1312
void ksz_update_port_member(struct ksz_device *dev, int port);
1413
void ksz_init_mib_timer(struct ksz_device *dev);
1514

0 commit comments

Comments
 (0)