[PATCH net-next] failover: remove set but not used variable 'primary_dev'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/net_failover.c: In function 'net_failover_slave_unregister':
drivers/net/net_failover.c:598:35: warning:
 variable 'primary_dev' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
---
 drivers/net/net_failover.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/net_failover.c b/drivers/net/net_failover.c
index 7ae1856..e103c94e 100644
--- a/drivers/net/net_failover.c
+++ b/drivers/net/net_failover.c
@@ -595,12 +595,11 @@ static int net_failover_slave_pre_unregister(struct net_device *slave_dev,
 static int net_failover_slave_unregister(struct net_device *slave_dev,
 					 struct net_device *failover_dev)
 {
-	struct net_device *standby_dev, *primary_dev;
+	struct net_device *standby_dev;
 	struct net_failover_info *nfo_info;
 	bool slave_is_standby;
 
 	nfo_info = netdev_priv(failover_dev);
-	primary_dev = rtnl_dereference(nfo_info->primary_dev);
 	standby_dev = rtnl_dereference(nfo_info->standby_dev);
 
 	vlan_vids_del_by_dev(slave_dev, failover_dev);




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux