Skip to content

Commit

Permalink
net: dsa: ksz: Remove dead code and fix warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Vasut authored and David S. Miller committed Aug 6, 2019
1 parent 0dfa0be commit ffc60b5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
11 changes: 1 addition & 10 deletions drivers/net/dsa/microchip/ksz_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,7 @@
#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)
{
Expand Down
1 change: 0 additions & 1 deletion drivers/net/dsa/microchip/ksz_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit ffc60b5

Please sign in to comment.