virt_wifi: remove set but not used variable 'w_priv'
authorYueHaibing <yuehaibing@huawei.com>
Thu, 17 Jan 2019 03:17:03 +0000 (03:17 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Sat, 19 Jan 2019 08:57:42 +0000 (09:57 +0100)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/virt_wifi.c: In function 'virt_wifi_net_device_stop':
drivers/net/wireless/virt_wifi.c:432:31: warning:
 variable 'w_priv' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virt_wifi.c

index 245d4d0af89bb1d8939d0b284d611b4ae30d32f5..9479b26b2d020e0e71835763d473fd0de1be60c8 100644 (file)
@@ -424,13 +424,11 @@ static int virt_wifi_net_device_open(struct net_device *dev)
 static int virt_wifi_net_device_stop(struct net_device *dev)
 {
        struct virt_wifi_netdev_priv *n_priv = netdev_priv(dev);
-       struct virt_wifi_wiphy_priv *w_priv;
 
        n_priv->is_up = false;
 
        if (!dev->ieee80211_ptr)
                return 0;
-       w_priv = wiphy_priv(dev->ieee80211_ptr->wiphy);
 
        virt_wifi_cancel_scan(dev->ieee80211_ptr->wiphy);
        virt_wifi_cancel_connect(dev);