1 From e4d1b2716b8859199c28f2ac5f984bd05a146a6b Mon Sep 17 00:00:00 2001
2 From: YueHaibing <yuehaibing@huawei.com>
3 Date: Mon, 18 Feb 2019 08:08:46 +0000
4 Subject: [PATCH] brcmfmac: remove set but not used variable 'old_state'
6 Fixes gcc '-Wunused-but-set-variable' warning:
8 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c: In function 'brcmf_usb_state_change':
9 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c:578:6: warning:
10 variable 'old_state' set but not used [-Wunused-but-set-variable]
12 It's never used and can be removed.
14 Signed-off-by: YueHaibing <yuehaibing@huawei.com>
15 Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
16 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
18 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 --
19 1 file changed, 2 deletions(-)
21 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
22 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
23 @@ -575,7 +575,6 @@ static void
24 brcmf_usb_state_change(struct brcmf_usbdev_info *devinfo, int state)
26 struct brcmf_bus *bcmf_bus = devinfo->bus_pub.bus;
29 brcmf_dbg(USB, "Enter, current state=%d, new state=%d\n",
30 devinfo->bus_pub.state, state);
31 @@ -583,7 +582,6 @@ brcmf_usb_state_change(struct brcmf_usbd
32 if (devinfo->bus_pub.state == state)
35 - old_state = devinfo->bus_pub.state;
36 devinfo->bus_pub.state = state;
38 /* update state of upper layer */