aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-21 11:37:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-21 14:37:38 -0400
commit41950bdfb5c530ba9b67037cc4c836677e750b6e (patch)
tree33bb96e5484fb032c3fbf94b9f50ac8c2c89e72c /drivers
parent8b74964c73ca9eed7078388d871cc7fae973cb63 (diff)
b43: silence most sparse warnings
CHECK drivers/net/wireless/b43/main.c drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static? CHECK drivers/net/wireless/b43/phy_g.c drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff) CHECK drivers/net/wireless/b43/phy_lp.c drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static? drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff) drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff) drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff) CHECK drivers/net/wireless/b43/wa.c drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (ffff0fff becomes fff) AFAICT, none of these amount to real bugs. But this reduces warning spam from sparse w/o significantly affecting readability of the code (IMHO). Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/b43/main.c2
-rw-r--r--drivers/net/wireless/b43/phy_g.c2
-rw-r--r--drivers/net/wireless/b43/phy_lp.c8
-rw-r--r--drivers/net/wireless/b43/wa.c8
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 8e243798ae93..20631ae2ddd7 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -108,7 +108,7 @@ int b43_modparam_verbose = B43_VERBOSITY_DEFAULT;
108module_param_named(verbose, b43_modparam_verbose, int, 0644); 108module_param_named(verbose, b43_modparam_verbose, int, 0644);
109MODULE_PARM_DESC(verbose, "Log message verbosity: 0=error, 1=warn, 2=info(default), 3=debug"); 109MODULE_PARM_DESC(verbose, "Log message verbosity: 0=error, 1=warn, 2=info(default), 3=debug");
110 110
111int b43_modparam_pio = B43_PIO_DEFAULT; 111static int b43_modparam_pio = B43_PIO_DEFAULT;
112module_param_named(pio, b43_modparam_pio, int, 0644); 112module_param_named(pio, b43_modparam_pio, int, 0644);
113MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO"); 113MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
114 114
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index 29bf34ced865..0dc33b65e86b 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -972,7 +972,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
972 b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B); 972 b43_phy_maskset(dev, 0x04A2, 0xFFF0, 0x000B);
973 973
974 if (phy->rev >= 3) { 974 if (phy->rev >= 3) {
975 b43_phy_mask(dev, 0x048A, (u16)~0x8000); 975 b43_phy_mask(dev, 0x048A, 0x7FFF);
976 b43_phy_maskset(dev, 0x0415, 0x8000, 0x36D8); 976 b43_phy_maskset(dev, 0x0415, 0x8000, 0x36D8);
977 b43_phy_maskset(dev, 0x0416, 0x8000, 0x36D8); 977 b43_phy_maskset(dev, 0x0416, 0x8000, 0x36D8);
978 b43_phy_maskset(dev, 0x0417, 0xFE00, 0x016D); 978 b43_phy_maskset(dev, 0x0417, 0xFE00, 0x016D);
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index c6afe9d94590..fd50eb116243 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -1145,7 +1145,7 @@ static void lpphy_write_tx_pctl_mode_to_hardware(struct b43_wldev *dev)
1145 B43_WARN_ON(1); 1145 B43_WARN_ON(1);
1146 } 1146 }
1147 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD, 1147 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
1148 (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE, ctl); 1148 ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF, ctl);
1149} 1149}
1150 1150
1151static void lpphy_set_tx_power_control(struct b43_wldev *dev, 1151static void lpphy_set_tx_power_control(struct b43_wldev *dev,
@@ -1522,11 +1522,11 @@ static void lpphy_tx_pctl_init_hw(struct b43_wldev *dev)
1522 b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xFF); 1522 b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xFF);
1523 b43_phy_write(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xA); 1523 b43_phy_write(dev, B43_LPPHY_TX_PWR_CTL_DELTAPWR_LIMIT, 0xA);
1524 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD, 1524 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
1525 (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE, 1525 ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF,
1526 B43_LPPHY_TX_PWR_CTL_CMD_MODE_OFF); 1526 B43_LPPHY_TX_PWR_CTL_CMD_MODE_OFF);
1527 b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xF8FF); 1527 b43_phy_mask(dev, B43_LPPHY_TX_PWR_CTL_NNUM, 0xF8FF);
1528 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD, 1528 b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_CMD,
1529 (u16)~B43_LPPHY_TX_PWR_CTL_CMD_MODE, 1529 ~B43_LPPHY_TX_PWR_CTL_CMD_MODE & 0xFFFF,
1530 B43_LPPHY_TX_PWR_CTL_CMD_MODE_SW); 1530 B43_LPPHY_TX_PWR_CTL_CMD_MODE_SW);
1531 1531
1532 if (dev->phy.rev < 2) { 1532 if (dev->phy.rev < 2) {
@@ -2698,7 +2698,7 @@ static enum b43_txpwr_result b43_lpphy_op_recalc_txpower(struct b43_wldev *dev,
2698 return B43_TXPWR_RES_DONE; 2698 return B43_TXPWR_RES_DONE;
2699} 2699}
2700 2700
2701void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on) 2701static void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
2702{ 2702{
2703 if (on) { 2703 if (on) {
2704 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xfff8); 2704 b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xfff8);
diff --git a/drivers/net/wireless/b43/wa.c b/drivers/net/wireless/b43/wa.c
index 97c79161c208..9a335da65b42 100644
--- a/drivers/net/wireless/b43/wa.c
+++ b/drivers/net/wireless/b43/wa.c
@@ -382,7 +382,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)
382 b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 3, 25); 382 b43_ofdmtab_write16(dev, B43_OFDMTAB_AGC1, 3, 25);
383 } 383 }
384 384
385 b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, (u16)~0xFF00, 0x5700); 385 b43_phy_maskset(dev, B43_PHY_CCKSHIFTBITS_WA, 0x00FF, 0x5700);
386 b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x007F, 0x000F); 386 b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x007F, 0x000F);
387 b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x3F80, 0x2B80); 387 b43_phy_maskset(dev, B43_PHY_OFDM(0x1A), ~0x3F80, 0x2B80);
388 b43_phy_maskset(dev, B43_PHY_ANTWRSETT, 0xF0FF, 0x0300); 388 b43_phy_maskset(dev, B43_PHY_ANTWRSETT, 0xF0FF, 0x0300);
@@ -400,9 +400,9 @@ static void b43_wa_altagc(struct b43_wldev *dev)
400 b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x00FF, 0x0020); 400 b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x00FF, 0x0020);
401 b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x3F00, 0x0200); 401 b43_phy_maskset(dev, B43_PHY_OFDM(0x89), ~0x3F00, 0x0200);
402 b43_phy_maskset(dev, B43_PHY_OFDM(0x82), ~0x00FF, 0x002E); 402 b43_phy_maskset(dev, B43_PHY_OFDM(0x82), ~0x00FF, 0x002E);
403 b43_phy_maskset(dev, B43_PHY_OFDM(0x96), (u16)~0xFF00, 0x1A00); 403 b43_phy_maskset(dev, B43_PHY_OFDM(0x96), 0x00FF, 0x1A00);
404 b43_phy_maskset(dev, B43_PHY_OFDM(0x81), ~0x00FF, 0x0028); 404 b43_phy_maskset(dev, B43_PHY_OFDM(0x81), ~0x00FF, 0x0028);
405 b43_phy_maskset(dev, B43_PHY_OFDM(0x81), (u16)~0xFF00, 0x2C00); 405 b43_phy_maskset(dev, B43_PHY_OFDM(0x81), 0x00FF, 0x2C00);
406 if (phy->rev == 1) { 406 if (phy->rev == 1) {
407 b43_phy_write(dev, B43_PHY_PEAK_COUNT, 0x092B); 407 b43_phy_write(dev, B43_PHY_PEAK_COUNT, 0x092B);
408 b43_phy_maskset(dev, B43_PHY_OFDM(0x1B), ~0x001E, 0x0002); 408 b43_phy_maskset(dev, B43_PHY_OFDM(0x1B), ~0x001E, 0x0002);
@@ -412,7 +412,7 @@ static void b43_wa_altagc(struct b43_wldev *dev)
412 b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, ~0x000F, 0x0004); 412 b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, ~0x000F, 0x0004);
413 if (phy->rev >= 6) { 413 if (phy->rev >= 6) {
414 b43_phy_write(dev, B43_PHY_OFDM(0x22), 0x287A); 414 b43_phy_write(dev, B43_PHY_OFDM(0x22), 0x287A);
415 b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, (u16)~0xF000, 0x3000); 415 b43_phy_maskset(dev, B43_PHY_LPFGAINCTL, 0x0FFF, 0x3000);
416 } 416 }
417 } 417 }
418 b43_phy_maskset(dev, B43_PHY_DIVSRCHIDX, 0x8080, 0x7874); 418 b43_phy_maskset(dev, B43_PHY_DIVSRCHIDX, 0x8080, 0x7874);