diff mbox series

rtl818x_pci: Remove set but not used variables 'io_addr, mem_addr'

Message ID 20190218075226.183964-1-yuehaibing@huawei.com (mailing list archive)
State Accepted
Commit b9b81d152cfbce6c99dd5f07156b61c41f98ac05
Delegated to: Kalle Valo
Headers show
Series rtl818x_pci: Remove set but not used variables 'io_addr, mem_addr' | expand

Commit Message

Yue Haibing Feb. 18, 2019, 7:52 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c: In function 'rtl8180_probe':
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c:1727:15: warning:
 variable 'io_addr' set but not used [-Wunused-but-set-variable]

drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c:1726:16: warning:
 variable 'mem_addr' set but not used [-Wunused-but-set-variable]

They're never used since introduction.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Kalle Valo Feb. 19, 2019, 3:18 p.m. UTC | #1
YueHaibing <yuehaibing@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c: In function 'rtl8180_probe':
> drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c:1727:15: warning:
>  variable 'io_addr' set but not used [-Wunused-but-set-variable]
> 
> drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c:1726:16: warning:
>  variable 'mem_addr' set but not used [-Wunused-but-set-variable]
> 
> They're never used since introduction.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

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

b9b81d152cfb rtl818x_pci: Remove set but not used variables 'io_addr, mem_addr'
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
index e2b1bfbcfbd4..d5f65372356b 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
@@ -1723,8 +1723,8 @@  static int rtl8180_probe(struct pci_dev *pdev,
 {
 	struct ieee80211_hw *dev;
 	struct rtl8180_priv *priv;
-	unsigned long mem_addr, mem_len;
-	unsigned int io_addr, io_len;
+	unsigned long mem_len;
+	unsigned int io_len;
 	int err;
 	const char *chip_name, *rf_name = NULL;
 	u32 reg;
@@ -1743,9 +1743,7 @@  static int rtl8180_probe(struct pci_dev *pdev,
 		goto err_disable_dev;
 	}
 
-	io_addr = pci_resource_start(pdev, 0);
 	io_len = pci_resource_len(pdev, 0);
-	mem_addr = pci_resource_start(pdev, 1);
 	mem_len = pci_resource_len(pdev, 1);
 
 	if (mem_len < sizeof(struct rtl818x_csr) ||