659cdabd8497e51b26db8e5d80cd1c853bac7037
[openwrt/staging/yousong.git] /
1 From a8254fa4ba60b85829b6e5ede6564f81cd70d59f Mon Sep 17 00:00:00 2001
2 From: YueHaibing <yuehaibing@huawei.com>
3 Date: Tue, 11 Sep 2018 11:24:04 +0800
4 Subject: [PATCH] brcmfmac: remove set but not used variables 'sfdoff' and
5 'pad_size'
6
7 Fixes gcc '-Wunused-but-set-variable' warning:
8
9 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_rxglom':
10 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1466:11: warning:
11 variable 'sfdoff' set but not used [-Wunused-but-set-variable]
12
13 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c: In function 'brcmf_sdio_bus_preinit':
14 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:3408:7: warning:
15 variable 'pad_size' set but not used [-Wunused-but-set-variable]
16
17 Signed-off-by: YueHaibing <yuehaibing@huawei.com>
18 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 ---
20 drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 5 +----
21 1 file changed, 1 insertion(+), 4 deletions(-)
22
23 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
24 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
25 @@ -1480,7 +1480,7 @@ static u8 brcmf_sdio_rxglom(struct brcmf
26 struct sk_buff *pfirst, *pnext;
27
28 int errcode;
29 - u8 doff, sfdoff;
30 + u8 doff;
31
32 struct brcmf_sdio_hdrinfo rd_new;
33
34 @@ -1614,7 +1614,6 @@ static u8 brcmf_sdio_rxglom(struct brcmf
35
36 /* Remove superframe header, remember offset */
37 skb_pull(pfirst, rd_new.dat_offset);
38 - sfdoff = rd_new.dat_offset;
39 num = 0;
40
41 /* Validate all the subframe headers */
42 @@ -3422,7 +3421,6 @@ static int brcmf_sdio_bus_preinit(struct
43 struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
44 struct brcmf_sdio *bus = sdiodev->bus;
45 struct brcmf_core *core = bus->sdio_core;
46 - uint pad_size;
47 u32 value;
48 int err;
49
50 @@ -3465,7 +3463,6 @@ static int brcmf_sdio_bus_preinit(struct
51 if (sdiodev->sg_support) {
52 bus->txglom = false;
53 value = 1;
54 - pad_size = bus->sdiodev->func2->cur_blksize << 1;
55 err = brcmf_iovar_data_set(bus->sdiodev->dev, "bus:rxglom",
56 &value, sizeof(u32));
57 if (err < 0) {