rtl818x_pci: Remove set but not used variables 'io_addr, mem_addr'
authorYueHaibing <yuehaibing@huawei.com>
Mon, 18 Feb 2019 07:52:26 +0000 (07:52 +0000)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 19 Feb 2019 15:17:42 +0000 (17:17 +0200)
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c

index e2b1bfbcfbd472fccd2eb28891a8eee7b121d1cb..d5f65372356bf9cf17d66f58b357284ea70ffdce 100644 (file)
@@ -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) ||