diff options
author | Hannes Eder <hannes@hanneseder.net> | 2009-02-14 06:49:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-17 22:34:50 -0500 |
commit | 49c4a5dceaff63c3080b3c9d311c1c023c3003af (patch) | |
tree | 1d518d0e8b8c689435a90f810deaf0218104eaa7 | |
parent | b1ae1e99bd9f611f16a09c1bca2a0a38e67b88c3 (diff) |
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: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/wireless/airo.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index acda45838e98..7e5cd15e59ad 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -3748,7 +3748,6 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) | |||
3748 | Cmd cmd; | 3748 | Cmd cmd; |
3749 | Resp rsp; | 3749 | Resp rsp; |
3750 | int status; | 3750 | int status; |
3751 | int i; | ||
3752 | SsidRid mySsid; | 3751 | SsidRid mySsid; |
3753 | __le16 lastindex; | 3752 | __le16 lastindex; |
3754 | WepKeyRid wkr; | 3753 | WepKeyRid wkr; |
@@ -3790,6 +3789,7 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) | |||
3790 | if (lock) | 3789 | if (lock) |
3791 | up(&ai->sem); | 3790 | up(&ai->sem); |
3792 | if (ai->config.len == 0) { | 3791 | if (ai->config.len == 0) { |
3792 | int i; | ||
3793 | tdsRssiRid rssi_rid; | 3793 | tdsRssiRid rssi_rid; |
3794 | CapabilityRid cap_rid; | 3794 | CapabilityRid cap_rid; |
3795 | 3795 | ||
@@ -3837,14 +3837,12 @@ static u16 setup_card(struct airo_info *ai, u8 *mac, int lock) | |||
3837 | /* Check to see if there are any insmod configured | 3837 | /* Check to see if there are any insmod configured |
3838 | rates to add */ | 3838 | rates to add */ |
3839 | if ( rates[0] ) { | 3839 | if ( rates[0] ) { |
3840 | int i = 0; | ||
3841 | memset(ai->config.rates,0,sizeof(ai->config.rates)); | 3840 | memset(ai->config.rates,0,sizeof(ai->config.rates)); |
3842 | for( i = 0; i < 8 && rates[i]; i++ ) { | 3841 | for( i = 0; i < 8 && rates[i]; i++ ) { |
3843 | ai->config.rates[i] = rates[i]; | 3842 | ai->config.rates[i] = rates[i]; |
3844 | } | 3843 | } |
3845 | } | 3844 | } |
3846 | if ( basic_rate > 0 ) { | 3845 | if ( basic_rate > 0 ) { |
3847 | int i; | ||
3848 | for( i = 0; i < 8; i++ ) { | 3846 | for( i = 0; i < 8; i++ ) { |
3849 | if ( ai->config.rates[i] == basic_rate || | 3847 | if ( ai->config.rates[i] == basic_rate || |
3850 | !ai->config.rates ) { | 3848 | !ai->config.rates ) { |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index 832679396b6c..688bdea8f13a 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -40,11 +40,11 @@ static u8 wv_irq_to_psa(int irq) | |||
40 | */ | 40 | */ |
41 | static int __init wv_psa_to_irq(u8 irqval) | 41 | static int __init wv_psa_to_irq(u8 irqval) |
42 | { | 42 | { |
43 | int irq; | 43 | int i; |
44 | 44 | ||
45 | for (irq = 0; irq < ARRAY_SIZE(irqvals); irq++) | 45 | for (i = 0; i < ARRAY_SIZE(irqvals); i++) |
46 | if (irqvals[irq] == irqval) | 46 | if (irqvals[i] == irqval) |
47 | return irq; | 47 | return i; |
48 | 48 | ||
49 | return -1; | 49 | return -1; |
50 | } | 50 | } |