]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ipw2x00: remove set but not used variable 'reason'
authorzhengbin <zhengbin13@huawei.com>
Sat, 16 Nov 2019 07:41:22 +0000 (15:41 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 20 Nov 2019 07:33:55 +0000 (09:33 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ipw_wx_set_mlme:
drivers/net/wireless/intel/ipw2x00/ipw2200.c:6805:9: warning: variable reason set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/intel/ipw2x00/ipw2200.c

index ed0f06532d5e2cf6d1edaebc1b416a09cdaa29bd..31e43fc1d12b32d53d22ab8f1902ef5eee05947f 100644 (file)
@@ -6788,9 +6788,6 @@ static int ipw_wx_set_mlme(struct net_device *dev,
 {
        struct ipw_priv *priv = libipw_priv(dev);
        struct iw_mlme *mlme = (struct iw_mlme *)extra;
-       __le16 reason;
-
-       reason = cpu_to_le16(mlme->reason_code);
 
        switch (mlme->cmd) {
        case IW_MLME_DEAUTH: