diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-04-29 14:54:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-29 15:25:45 -0400 |
commit | 2eeb6fd063d812a528118536857d078bca5a1e05 (patch) | |
tree | 26385c0a5bb95c2c9608dc4b64068fe12add1bbd /drivers/net/wireless/b43 | |
parent | e245292e0a98bfbf2b54c5c0f079033f4d06dd32 (diff) |
b43: avoid uninitialized variable warnings in phy_n
CC [M] drivers/net/wireless/b43/phy_n.o
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_set_channel’:
drivers/net/wireless/b43/phy_n.c:3848:47: warning: ‘tabent_r2’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c:3849:47: warning: ‘tabent_r3’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_poll_rssi.clone.14’:
drivers/net/wireless/b43/phy_n.c:2270:6: warning: ‘save_regs_phy$7’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c:2270:6: warning: ‘save_regs_phy$8’ may be used uninitialized in this function
FWIW, the usage of these variables is goverened by checks that match
their initializations. So, I think these are actually false warnings.
Still, I would rather avoid the warning SPAM...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 8a00f9a95dbb..6755063f955a 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -2281,6 +2281,7 @@ static int b43_nphy_poll_rssi(struct b43_wldev *dev, u8 type, s32 *buf, | |||
2281 | save_regs_phy[5] = b43_phy_read(dev, B43_NPHY_AFECTL_OVER); | 2281 | save_regs_phy[5] = b43_phy_read(dev, B43_NPHY_AFECTL_OVER); |
2282 | save_regs_phy[6] = b43_phy_read(dev, B43_NPHY_TXF_40CO_B1S0); | 2282 | save_regs_phy[6] = b43_phy_read(dev, B43_NPHY_TXF_40CO_B1S0); |
2283 | save_regs_phy[7] = b43_phy_read(dev, B43_NPHY_TXF_40CO_B32S1); | 2283 | save_regs_phy[7] = b43_phy_read(dev, B43_NPHY_TXF_40CO_B32S1); |
2284 | save_regs_phy[8] = 0; | ||
2284 | } else { | 2285 | } else { |
2285 | save_regs_phy[0] = b43_phy_read(dev, B43_NPHY_AFECTL_C1); | 2286 | save_regs_phy[0] = b43_phy_read(dev, B43_NPHY_AFECTL_C1); |
2286 | save_regs_phy[1] = b43_phy_read(dev, B43_NPHY_AFECTL_C2); | 2287 | save_regs_phy[1] = b43_phy_read(dev, B43_NPHY_AFECTL_C2); |
@@ -2289,6 +2290,8 @@ static int b43_nphy_poll_rssi(struct b43_wldev *dev, u8 type, s32 *buf, | |||
2289 | save_regs_phy[4] = b43_phy_read(dev, B43_NPHY_RFCTL_OVER); | 2290 | save_regs_phy[4] = b43_phy_read(dev, B43_NPHY_RFCTL_OVER); |
2290 | save_regs_phy[5] = b43_phy_read(dev, B43_NPHY_RFCTL_RSSIO1); | 2291 | save_regs_phy[5] = b43_phy_read(dev, B43_NPHY_RFCTL_RSSIO1); |
2291 | save_regs_phy[6] = b43_phy_read(dev, B43_NPHY_RFCTL_RSSIO2); | 2292 | save_regs_phy[6] = b43_phy_read(dev, B43_NPHY_RFCTL_RSSIO2); |
2293 | save_regs_phy[7] = 0; | ||
2294 | save_regs_phy[8] = 0; | ||
2292 | } | 2295 | } |
2293 | 2296 | ||
2294 | b43_nphy_rssi_select(dev, 5, type); | 2297 | b43_nphy_rssi_select(dev, 5, type); |
@@ -3845,8 +3848,8 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, | |||
3845 | { | 3848 | { |
3846 | struct b43_phy *phy = &dev->phy; | 3849 | struct b43_phy *phy = &dev->phy; |
3847 | 3850 | ||
3848 | const struct b43_nphy_channeltab_entry_rev2 *tabent_r2; | 3851 | const struct b43_nphy_channeltab_entry_rev2 *tabent_r2 = NULL; |
3849 | const struct b43_nphy_channeltab_entry_rev3 *tabent_r3; | 3852 | const struct b43_nphy_channeltab_entry_rev3 *tabent_r3 = NULL; |
3850 | 3853 | ||
3851 | u8 tmp; | 3854 | u8 tmp; |
3852 | 3855 | ||