diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-12-19 08:56:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-19 22:27:29 -0500 |
commit | 3db1cd5c05f35fb43eb134df6f321de4e63141f2 (patch) | |
tree | 960039f3f4f0a524b37e94434624da154859bc64 /drivers/net/wireless/brcm80211/brcmsmac | |
parent | a8e510f682fe6d7671c11887e07c55f86caaf3c1 (diff) |
net: fix assignment of 0/1 to bool variables.
DaveM said:
Please, this kind of stuff rots forever and not using bool properly
drives me crazy.
Joe Perches <joe@perches.com> gave me the spatch script:
@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true
I merely installed coccinelle, read the documentation and took credit.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/dma.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | 32 |
3 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/dma.c b/drivers/net/wireless/brcm80211/brcmsmac/dma.c index b4cf617276c9..2e90a9a16ed6 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/dma.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/dma.c | |||
@@ -641,10 +641,10 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih, | |||
641 | /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */ | 641 | /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */ |
642 | if ((core->id.id == SDIOD_CORE_ID) | 642 | if ((core->id.id == SDIOD_CORE_ID) |
643 | && ((rev > 0) && (rev <= 2))) | 643 | && ((rev > 0) && (rev <= 2))) |
644 | di->addrext = 0; | 644 | di->addrext = false; |
645 | else if ((core->id.id == I2S_CORE_ID) && | 645 | else if ((core->id.id == I2S_CORE_ID) && |
646 | ((rev == 0) || (rev == 1))) | 646 | ((rev == 0) || (rev == 1))) |
647 | di->addrext = 0; | 647 | di->addrext = false; |
648 | else | 648 | else |
649 | di->addrext = _dma_isaddrext(di); | 649 | di->addrext = _dma_isaddrext(di); |
650 | 650 | ||
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c index 77fdc45b43ef..d106576ce338 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c | |||
@@ -1265,7 +1265,7 @@ uint brcms_reset(struct brcms_info *wl) | |||
1265 | brcms_c_reset(wl->wlc); | 1265 | brcms_c_reset(wl->wlc); |
1266 | 1266 | ||
1267 | /* dpc will not be rescheduled */ | 1267 | /* dpc will not be rescheduled */ |
1268 | wl->resched = 0; | 1268 | wl->resched = false; |
1269 | 1269 | ||
1270 | return 0; | 1270 | return 0; |
1271 | } | 1271 | } |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c index efa0142bdad5..ce8562aa5db0 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c | |||
@@ -1603,7 +1603,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, u16 chanspec) | |||
1603 | si_pmu_pllupd(pi->sh->sih); | 1603 | si_pmu_pllupd(pi->sh->sih); |
1604 | write_phy_reg(pi, 0x942, 0); | 1604 | write_phy_reg(pi, 0x942, 0); |
1605 | wlc_lcnphy_txrx_spur_avoidance_mode(pi, false); | 1605 | wlc_lcnphy_txrx_spur_avoidance_mode(pi, false); |
1606 | pi_lcn->lcnphy_spurmod = 0; | 1606 | pi_lcn->lcnphy_spurmod = false; |
1607 | mod_phy_reg(pi, 0x424, (0xff << 8), (0x1b) << 8); | 1607 | mod_phy_reg(pi, 0x424, (0xff << 8), (0x1b) << 8); |
1608 | 1608 | ||
1609 | write_phy_reg(pi, 0x425, 0x5907); | 1609 | write_phy_reg(pi, 0x425, 0x5907); |
@@ -1616,7 +1616,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, u16 chanspec) | |||
1616 | write_phy_reg(pi, 0x942, 0); | 1616 | write_phy_reg(pi, 0x942, 0); |
1617 | wlc_lcnphy_txrx_spur_avoidance_mode(pi, true); | 1617 | wlc_lcnphy_txrx_spur_avoidance_mode(pi, true); |
1618 | 1618 | ||
1619 | pi_lcn->lcnphy_spurmod = 0; | 1619 | pi_lcn->lcnphy_spurmod = false; |
1620 | mod_phy_reg(pi, 0x424, (0xff << 8), (0x1f) << 8); | 1620 | mod_phy_reg(pi, 0x424, (0xff << 8), (0x1f) << 8); |
1621 | 1621 | ||
1622 | write_phy_reg(pi, 0x425, 0x590a); | 1622 | write_phy_reg(pi, 0x425, 0x590a); |
@@ -2325,7 +2325,7 @@ static s8 wlc_lcnphy_tempcompensated_txpwrctrl(struct brcms_phy *pi) | |||
2325 | { | 2325 | { |
2326 | s8 index, delta_brd, delta_temp, new_index, tempcorrx; | 2326 | s8 index, delta_brd, delta_temp, new_index, tempcorrx; |
2327 | s16 manp, meas_temp, temp_diff; | 2327 | s16 manp, meas_temp, temp_diff; |
2328 | bool neg = 0; | 2328 | bool neg = false; |
2329 | u16 temp; | 2329 | u16 temp; |
2330 | struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; | 2330 | struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; |
2331 | 2331 | ||
@@ -2348,7 +2348,7 @@ static s8 wlc_lcnphy_tempcompensated_txpwrctrl(struct brcms_phy *pi) | |||
2348 | manp = LCNPHY_TEMPSENSE(pi_lcn->lcnphy_rawtempsense); | 2348 | manp = LCNPHY_TEMPSENSE(pi_lcn->lcnphy_rawtempsense); |
2349 | temp_diff = manp - meas_temp; | 2349 | temp_diff = manp - meas_temp; |
2350 | if (temp_diff < 0) { | 2350 | if (temp_diff < 0) { |
2351 | neg = 1; | 2351 | neg = true; |
2352 | temp_diff = -temp_diff; | 2352 | temp_diff = -temp_diff; |
2353 | } | 2353 | } |
2354 | 2354 | ||
@@ -3682,8 +3682,8 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, | |||
3682 | wlc_lcnphy_set_cc(pi, cal_type, phy_c15, phy_c16); | 3682 | wlc_lcnphy_set_cc(pi, cal_type, phy_c15, phy_c16); |
3683 | udelay(20); | 3683 | udelay(20); |
3684 | for (phy_c8 = 0; phy_c7 != 0 && phy_c8 < num_levels; phy_c8++) { | 3684 | for (phy_c8 = 0; phy_c7 != 0 && phy_c8 < num_levels; phy_c8++) { |
3685 | phy_c23 = 1; | 3685 | phy_c23 = true; |
3686 | phy_c22 = 0; | 3686 | phy_c22 = false; |
3687 | switch (cal_type) { | 3687 | switch (cal_type) { |
3688 | case 0: | 3688 | case 0: |
3689 | phy_c10 = 511; | 3689 | phy_c10 = 511; |
@@ -3701,18 +3701,18 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, | |||
3701 | 3701 | ||
3702 | phy_c9 = read_phy_reg(pi, 0x93d); | 3702 | phy_c9 = read_phy_reg(pi, 0x93d); |
3703 | phy_c9 = 2 * phy_c9; | 3703 | phy_c9 = 2 * phy_c9; |
3704 | phy_c24 = 0; | 3704 | phy_c24 = false; |
3705 | phy_c5 = 7; | 3705 | phy_c5 = 7; |
3706 | phy_c25 = 1; | 3706 | phy_c25 = true; |
3707 | while (1) { | 3707 | while (1) { |
3708 | write_radio_reg(pi, RADIO_2064_REG026, | 3708 | write_radio_reg(pi, RADIO_2064_REG026, |
3709 | (phy_c5 & 0x7) | ((phy_c5 & 0x7) << 4)); | 3709 | (phy_c5 & 0x7) | ((phy_c5 & 0x7) << 4)); |
3710 | udelay(50); | 3710 | udelay(50); |
3711 | phy_c22 = 0; | 3711 | phy_c22 = false; |
3712 | ptr[130] = 0; | 3712 | ptr[130] = 0; |
3713 | wlc_lcnphy_samp_cap(pi, 1, phy_c9, &ptr[0], 2); | 3713 | wlc_lcnphy_samp_cap(pi, 1, phy_c9, &ptr[0], 2); |
3714 | if (ptr[130] == 1) | 3714 | if (ptr[130] == 1) |
3715 | phy_c22 = 1; | 3715 | phy_c22 = true; |
3716 | if (phy_c22) | 3716 | if (phy_c22) |
3717 | phy_c5 -= 1; | 3717 | phy_c5 -= 1; |
3718 | if ((phy_c22 != phy_c24) && (!phy_c25)) | 3718 | if ((phy_c22 != phy_c24) && (!phy_c25)) |
@@ -3722,7 +3722,7 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, | |||
3722 | if (phy_c5 <= 0 || phy_c5 >= 7) | 3722 | if (phy_c5 <= 0 || phy_c5 >= 7) |
3723 | break; | 3723 | break; |
3724 | phy_c24 = phy_c22; | 3724 | phy_c24 = phy_c22; |
3725 | phy_c25 = 0; | 3725 | phy_c25 = false; |
3726 | } | 3726 | } |
3727 | 3727 | ||
3728 | if (phy_c5 < 0) | 3728 | if (phy_c5 < 0) |
@@ -3773,10 +3773,10 @@ wlc_lcnphy_a1(struct brcms_phy *pi, int cal_type, int num_levels, | |||
3773 | phy_c13 = phy_c11; | 3773 | phy_c13 = phy_c11; |
3774 | phy_c14 = phy_c12; | 3774 | phy_c14 = phy_c12; |
3775 | } | 3775 | } |
3776 | phy_c23 = 0; | 3776 | phy_c23 = false; |
3777 | } | 3777 | } |
3778 | } | 3778 | } |
3779 | phy_c23 = 1; | 3779 | phy_c23 = true; |
3780 | phy_c15 = phy_c13; | 3780 | phy_c15 = phy_c13; |
3781 | phy_c16 = phy_c14; | 3781 | phy_c16 = phy_c14; |
3782 | phy_c7 = phy_c7 >> 1; | 3782 | phy_c7 = phy_c7 >> 1; |
@@ -3966,7 +3966,7 @@ s16 wlc_lcnphy_tempsense_new(struct brcms_phy *pi, bool mode) | |||
3966 | { | 3966 | { |
3967 | u16 tempsenseval1, tempsenseval2; | 3967 | u16 tempsenseval1, tempsenseval2; |
3968 | s16 avg = 0; | 3968 | s16 avg = 0; |
3969 | bool suspend = 0; | 3969 | bool suspend = false; |
3970 | 3970 | ||
3971 | if (mode == 1) { | 3971 | if (mode == 1) { |
3972 | suspend = (0 == (bcma_read32(pi->d11core, | 3972 | suspend = (0 == (bcma_read32(pi->d11core, |
@@ -4008,7 +4008,7 @@ u16 wlc_lcnphy_tempsense(struct brcms_phy *pi, bool mode) | |||
4008 | { | 4008 | { |
4009 | u16 tempsenseval1, tempsenseval2; | 4009 | u16 tempsenseval1, tempsenseval2; |
4010 | s32 avg = 0; | 4010 | s32 avg = 0; |
4011 | bool suspend = 0; | 4011 | bool suspend = false; |
4012 | u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi); | 4012 | u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi); |
4013 | struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; | 4013 | struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; |
4014 | 4014 | ||
@@ -4076,7 +4076,7 @@ s8 wlc_lcnphy_vbatsense(struct brcms_phy *pi, bool mode) | |||
4076 | { | 4076 | { |
4077 | u16 vbatsenseval; | 4077 | u16 vbatsenseval; |
4078 | s32 avg = 0; | 4078 | s32 avg = 0; |
4079 | bool suspend = 0; | 4079 | bool suspend = false; |
4080 | 4080 | ||
4081 | if (mode == 1) { | 4081 | if (mode == 1) { |
4082 | suspend = (0 == (bcma_read32(pi->d11core, | 4082 | suspend = (0 == (bcma_read32(pi->d11core, |