Commit d278360a authored by Nikolay Kyx's avatar Nikolay Kyx Committed by Greg Kroah-Hartman

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: default avatarNikolay Kyx <knv418@gmail.com>
Link: https://lore.kernel.org/r/20210302133217.145994-1-knv418@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7f33733c
......@@ -800,12 +800,10 @@ bool rtl92e_start_adapter(struct net_device *dev)
}
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment