diff options
author | Nikolay Kyx <knv418@gmail.com> | 2021-03-02 16:32:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-10 09:25:33 +0100 |
commit | d278360a3b3301c9e2bfb6a350cb2763edd9ee23 (patch) | |
tree | 149e177ec7d807c7b14fcb56072d075dc302051a /drivers/staging/rtl8192e | |
parent | 7f33733cf131faf3ba25e82788f0d615be4d836e (diff) | |
download | linux-stable-d278360a3b3301c9e2bfb6a350cb2763edd9ee23.tar.gz linux-stable-d278360a3b3301c9e2bfb6a350cb2763edd9ee23.tar.bz2 linux-stable-d278360a3b3301c9e2bfb6a350cb2763edd9ee23.zip |
staging: rtl8192e: remove redundant variable shadowing
In function rtl92e_start_adapter() automatic variable 'i' referenced only
within certain loops, used as iteration counter. Control flow can't get
into such loop w/o 'i = 0' assignment.
It's redundant to shadow this variable by creating scope around loop.
This patch fixes the following sparse warning:
warning: symbol 'i' shadows an earlier one
Signed-off-by: Nikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210302133217.145994-1-knv418@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index ff843d7ec606..8cd085ebea81 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -800,12 +800,10 @@ start: } rtl92e_writew(dev, ATIMWND, 2); rtl92e_writew(dev, BCN_INTERVAL, 100); - { - int i; - for (i = 0; i < QOS_QUEUE_NUM; i++) - rtl92e_writel(dev, WDCAPARA_ADD[i], 0x005e4332); - } + for (i = 0; i < QOS_QUEUE_NUM; i++) + rtl92e_writel(dev, WDCAPARA_ADD[i], 0x005e4332); + rtl92e_writeb(dev, 0xbe, 0xc0); rtl92e_config_mac(dev); |