25b3ceb95921263892eee77fa3a8f3c2b4570305
[openwrt/staging/blocktrron.git] /
1 From 7af496b9eb0433bc4cb478c9a46f85509cdb5541 Mon Sep 17 00:00:00 2001
2 From: zhengbin <zhengbin13@huawei.com>
3 Date: Sat, 16 Nov 2019 15:22:47 +0800
4 Subject: [PATCH] brcmfmac: remove set but not used variable
5 'mpnum','nsp','nmp'
6
7 Fixes gcc '-Wunused-but-set-variable' warning:
8
9 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_get_regaddr:
10 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:790:5: warning: variable mpnum set but not used [-Wunused-but-set-variable]
11 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_erom_scan:
12 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:866:10: warning: variable nsp set but not used [-Wunused-but-set-variable]
13 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c: In function brcmf_chip_dmp_erom_scan:
14 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c:866:5: warning: variable nmp set but not used [-Wunused-but-set-variable]
15
16 Reported-by: Hulk Robot <hulkci@huawei.com>
17 Signed-off-by: zhengbin <zhengbin13@huawei.com>
18 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
19 ---
20 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 6 +-----
21 1 file changed, 1 insertion(+), 5 deletions(-)
22
23 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
24 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
25 @@ -778,7 +778,6 @@ static int brcmf_chip_dmp_get_regaddr(st
26 {
27 u8 desc;
28 u32 val, szdesc;
29 - u8 mpnum = 0;
30 u8 stype, sztype, wraptype;
31
32 *regbase = 0;
33 @@ -786,7 +785,6 @@ static int brcmf_chip_dmp_get_regaddr(st
34
35 val = brcmf_chip_dmp_get_desc(ci, eromaddr, &desc);
36 if (desc == DMP_DESC_MASTER_PORT) {
37 - mpnum = (val & DMP_MASTER_PORT_NUM) >> DMP_MASTER_PORT_NUM_S;
38 wraptype = DMP_SLAVE_TYPE_MWRAP;
39 } else if (desc == DMP_DESC_ADDRESS) {
40 /* revert erom address */
41 @@ -854,7 +852,7 @@ int brcmf_chip_dmp_erom_scan(struct brcm
42 u8 desc_type = 0;
43 u32 val;
44 u16 id;
45 - u8 nmp, nsp, nmw, nsw, rev;
46 + u8 nmw, nsw, rev;
47 u32 base, wrap;
48 int err;
49
50 @@ -880,8 +878,6 @@ int brcmf_chip_dmp_erom_scan(struct brcm
51 return -EFAULT;
52
53 /* only look at cores with master port(s) */
54 - nmp = (val & DMP_COMP_NUM_MPORT) >> DMP_COMP_NUM_MPORT_S;
55 - nsp = (val & DMP_COMP_NUM_SPORT) >> DMP_COMP_NUM_SPORT_S;
56 nmw = (val & DMP_COMP_NUM_MWRAP) >> DMP_COMP_NUM_MWRAP_S;
57 nsw = (val & DMP_COMP_NUM_SWRAP) >> DMP_COMP_NUM_SWRAP_S;
58 rev = (val & DMP_COMP_REVISION) >> DMP_COMP_REVISION_S;