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
7 Fixes gcc '-Wunused-but-set-variable' warning:
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]
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>
20 drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 6 +-----
21 1 file changed, 1 insertion(+), 5 deletions(-)
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
30 u8 stype, sztype, wraptype;
33 @@ -786,7 +785,6 @@ static int brcmf_chip_dmp_get_regaddr(st
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
45 - u8 nmp, nsp, nmw, nsw, rev;
50 @@ -880,8 +878,6 @@ int brcmf_chip_dmp_erom_scan(struct brcm
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;