[PATCH net-next] net: qlcnic: remove unused variable 'val' in qlcnic_83xx_cam_unlock()

Subsystems: networking drivers, qlogic qlcnic (1/10)gb ethernet driver, the rest

STALE2175d

2 messages, 2 authors, 2020-09-14 · open the first message on its own page

[PATCH net-next] net: qlcnic: remove unused variable 'val' in qlcnic_83xx_cam_unlock()

From: Zhang Changzhong <hidden>
Date: 2020-09-14 14:18:04

Fixes the following W=1 kernel build warning(s):

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:661:6: warning:
 variable 'val' set but not used [-Wunused-but-set-variable]
  661 |  u32 val;
      |      ^~~

After commit 7f9664525f9c ("qlcnic: 83xx memory map and HW access
routines"), variable 'val' is never used in qlcnic_83xx_cam_unlock(), so
removing it to avoid build warning.

Reported-by: Hulk Robot <redacted>
Signed-off-by: Zhang Changzhong <redacted>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 29b9c72..fc49088 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -658,11 +658,10 @@ int qlcnic_83xx_cam_lock(struct qlcnic_adapter *adapter)
 void qlcnic_83xx_cam_unlock(struct qlcnic_adapter *adapter)
 {
 	void __iomem *addr;
-	u32 val;
 	struct qlcnic_hardware_context *ahw = adapter->ahw;
 
 	addr = ahw->pci_base0 + QLC_83XX_SEM_UNLOCK_FUNC(ahw->pci_func);
-	val = readl(addr);
+	readl(addr);
 }
 
 void qlcnic_83xx_read_crb(struct qlcnic_adapter *adapter, char *buf,
-- 
2.9.5

Re: [PATCH net-next] net: qlcnic: remove unused variable 'val' in qlcnic_83xx_cam_unlock()

From: David Miller <davem@davemloft.net>
Date: 2020-09-14 20:44:36

From: Zhang Changzhong <redacted>
Date: Mon, 14 Sep 2020 21:24:39 +0800
Fixes the following W=1 kernel build warning(s):

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:661:6: warning:
 variable 'val' set but not used [-Wunused-but-set-variable]
  661 |  u32 val;
      |      ^~~

After commit 7f9664525f9c ("qlcnic: 83xx memory map and HW access
routines"), variable 'val' is never used in qlcnic_83xx_cam_unlock(), so
removing it to avoid build warning.

Reported-by: Hulk Robot <redacted>
Signed-off-by: Zhang Changzhong <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help