Commit 49c4a5dc authored by Hannes Eder's avatar Hannes Eder Committed by David S. Miller

drivers/net/wireless: fix sparse warnings: symbol shadows an earlier one

Impact:
  Move variable closer to usage resp.
  remove redundant variables resp.
  rename function scope variable.

Fix this sparse warnings:
  drivers/net/wireless/airo.c:3840:29: warning: symbol 'i' shadows an earlier one
  drivers/net/wireless/airo.c:3751:13: originally declared here
  drivers/net/wireless/airo.c:3847:29: warning: symbol 'i' shadows an earlier one
  drivers/net/wireless/airo.c:3751:13: originally declared here
  drivers/net/wireless/airo.c:3861:21: warning: symbol 'i' shadows an earlier one
  drivers/net/wireless/airo.c:3751:13: originally declared here
  drivers/net/wireless/wavelan.c:43:13: warning: symbol 'irq' shadows an earlier one
  drivers/net/wireless/wavelan.p.h:692:17: originally declared here
Signed-off-by: default avatarHannes Eder <hannes@hanneseder.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b1ae1e99
...@@ -3748,7 +3748,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ...@@ -3748,7 +3748,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
Cmd cmd; Cmd cmd;
Resp rsp; Resp rsp;
int status; int status;
int i;
SsidRid mySsid; SsidRid mySsid;
__le16 lastindex; __le16 lastindex;
WepKeyRid wkr; WepKeyRid wkr;
...@@ -3790,6 +3789,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ...@@ -3790,6 +3789,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
if (lock) if (lock)
up(&ai->sem); up(&ai->sem);
if (ai->config.len == 0) { if (ai->config.len == 0) {
int i;
tdsRssiRid rssi_rid; tdsRssiRid rssi_rid;
CapabilityRid cap_rid; CapabilityRid cap_rid;
...@@ -3837,14 +3837,12 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) ...@@ -3837,14 +3837,12 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock)
/* Check to see if there are any insmod configured /* Check to see if there are any insmod configured
rates to add */ rates to add */
if ( rates[0] ) { if ( rates[0] ) {
int i = 0;
memset(ai->config.rates,0,sizeof(ai->config.rates)); memset(ai->config.rates,0,sizeof(ai->config.rates));
for( i = 0; i < 8 && rates[i]; i++ ) { for( i = 0; i < 8 && rates[i]; i++ ) {
ai->config.rates[i] = rates[i]; ai->config.rates[i] = rates[i];
} }
} }
if ( basic_rate > 0 ) { if ( basic_rate > 0 ) {
int i;
for( i = 0; i < 8; i++ ) { for( i = 0; i < 8; i++ ) {
if ( ai->config.rates[i] == basic_rate || if ( ai->config.rates[i] == basic_rate ||
!ai->config.rates ) { !ai->config.rates ) {
......
...@@ -40,11 +40,11 @@ static u8 wv_irq_to_psa(int irq) ...@@ -40,11 +40,11 @@ static u8 wv_irq_to_psa(int irq)
*/ */
static int __init wv_psa_to_irq(u8 irqval) static int __init wv_psa_to_irq(u8 irqval)
{ {
int irq; int i;
for (irq = 0; irq < ARRAY_SIZE(irqvals); irq++) for (i = 0; i < ARRAY_SIZE(irqvals); i++)
if (irqvals[irq] == irqval) if (irqvals[i] == irqval)
return irq; return i;
return -1; return -1;
} }
......
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