linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: bcma: remove set but not used variable `addrh` and `sizeh`
@ 2020-07-20  1:44 Zheng Yongjun
  0 siblings, 0 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-07-20  1:44 UTC (permalink / raw)
  To: zajec5, linux-wireless; +Cc: Zheng Yongjun

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/bcma/scan.c: In function 'bcma_erom_get_addr_desc':
drivers/bcma/scan.c:219 warning:
variable `addrh` and `sizeh` set but not used [-Wunused-but-set-variable]

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/bcma/scan.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 1a942f734188..d49e7c0de2b6 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -219,7 +219,7 @@ static s32 bcma_erom_get_mst_port(struct bcma_bus *bus, u32 __iomem **eromptr)
 static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr,
 				  u32 type, u8 port)
 {
-	u32 addrl, addrh, sizeh = 0;
+	u32 addrl;
 	u32 size;
 
 	u32 ent = bcma_erom_get_ent(bus, eromptr);
@@ -233,14 +233,12 @@ static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr,
 
 	addrl = ent & SCAN_ADDR_ADDR;
 	if (ent & SCAN_ADDR_AG32)
-		addrh = bcma_erom_get_ent(bus, eromptr);
-	else
-		addrh = 0;
+		bcma_erom_get_ent(bus, eromptr);
 
 	if ((ent & SCAN_ADDR_SZ) == SCAN_ADDR_SZ_SZD) {
 		size = bcma_erom_get_ent(bus, eromptr);
 		if (size & SCAN_SIZE_SG32)
-			sizeh = bcma_erom_get_ent(bus, eromptr);
+			bcma_erom_get_ent(bus, eromptr);
 	}
 
 	return addrl;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: bcma: remove set but not used variable `addrh` and `sizeh`
  2020-07-21  8:39 Zheng Yongjun
@ 2020-08-02 15:26 ` Kalle Valo
  0 siblings, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2020-08-02 15:26 UTC (permalink / raw)
  To: Zheng Yongjun; +Cc: zajec5, linux-wireless, linux-kernel, Zheng Yongjun

Zheng Yongjun <zhengyongjun3@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/bcma/scan.c: In function 'bcma_erom_get_addr_desc':
> drivers/bcma/scan.c:219 warning:
> variable `addrh` and `sizeh` set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Patch applied to wireless-drivers-next.git, thanks.

92d26d1abf8e drivers: bcma: remove set but not used variable `addrh` and `sizeh`

-- 
https://patchwork.kernel.org/patch/11675235/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] drivers: bcma: remove set but not used variable `addrh` and `sizeh`
@ 2020-07-21  8:39 Zheng Yongjun
  2020-08-02 15:26 ` Kalle Valo
  0 siblings, 1 reply; 3+ messages in thread
From: Zheng Yongjun @ 2020-07-21  8:39 UTC (permalink / raw)
  To: zajec5, linux-wireless; +Cc: linux-kernel, Zheng Yongjun

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/bcma/scan.c: In function 'bcma_erom_get_addr_desc':
drivers/bcma/scan.c:219 warning:
variable `addrh` and `sizeh` set but not used [-Wunused-but-set-variable]

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/bcma/scan.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c
index 1a942f734188..d49e7c0de2b6 100644
--- a/drivers/bcma/scan.c
+++ b/drivers/bcma/scan.c
@@ -219,7 +219,7 @@ static s32 bcma_erom_get_mst_port(struct bcma_bus *bus, u32 __iomem **eromptr)
 static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr,
 				  u32 type, u8 port)
 {
-	u32 addrl, addrh, sizeh = 0;
+	u32 addrl;
 	u32 size;
 
 	u32 ent = bcma_erom_get_ent(bus, eromptr);
@@ -233,14 +233,12 @@ static u32 bcma_erom_get_addr_desc(struct bcma_bus *bus, u32 __iomem **eromptr,
 
 	addrl = ent & SCAN_ADDR_ADDR;
 	if (ent & SCAN_ADDR_AG32)
-		addrh = bcma_erom_get_ent(bus, eromptr);
-	else
-		addrh = 0;
+		bcma_erom_get_ent(bus, eromptr);
 
 	if ((ent & SCAN_ADDR_SZ) == SCAN_ADDR_SZ_SZD) {
 		size = bcma_erom_get_ent(bus, eromptr);
 		if (size & SCAN_SIZE_SG32)
-			sizeh = bcma_erom_get_ent(bus, eromptr);
+			bcma_erom_get_ent(bus, eromptr);
 	}
 
 	return addrl;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-02 15:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  1:44 [PATCH] drivers: bcma: remove set but not used variable `addrh` and `sizeh` Zheng Yongjun
2020-07-21  8:39 Zheng Yongjun
2020-08-02 15:26 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).