2a46378e73debc8b06f3fd06e13c1fc2a34d31a2
[openwrt/staging/xback.git] /
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'
5
6 Fixes gcc '-Wunused-but-set-variable' warning:
7
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]
11
12 It's never used and can be removed.
13
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>
17 ---
18 drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 2 --
19 1 file changed, 2 deletions(-)
20
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)
25 {
26 struct brcmf_bus *bcmf_bus = devinfo->bus_pub.bus;
27 - int old_state;
28
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)
33 return;
34
35 - old_state = devinfo->bus_pub.state;
36 devinfo->bus_pub.state = state;
37
38 /* update state of upper layer */