Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wireless: Use bool function returns of true/false instead of 1/0

Use bool constants as the return values instead of 1 and 0.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Joe Perches and committed by
Kalle Valo
12827fec cad737df

+17 -17
+6 -6
drivers/net/wireless/b43/dma.c
··· 553 553 size_t buffersize, bool dma_to_device) 554 554 { 555 555 if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr))) 556 - return 1; 556 + return true; 557 557 558 558 switch (ring->type) { 559 559 case B43_DMA_30BIT: ··· 571 571 } 572 572 573 573 /* The address is OK. */ 574 - return 0; 574 + return false; 575 575 576 576 address_error: 577 577 /* We can't support this address. Unmap it again. */ 578 578 unmap_descbuffer(ring, addr, buffersize, dma_to_device); 579 579 580 - return 1; 580 + return true; 581 581 } 582 582 583 583 static bool b43_rx_buffer_is_poisoned(struct b43_dmaring *ring, struct sk_buff *skb) ··· 1099 1099 enum b43_dmatype type) 1100 1100 { 1101 1101 if (type != B43_DMA_64BIT) 1102 - return 1; 1102 + return true; 1103 1103 1104 1104 #ifdef CONFIG_B43_SSB 1105 1105 if (dev->dev->bus_type == B43_BUS_SSB && 1106 1106 dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI && 1107 1107 !(pci_is_pcie(dev->dev->sdev->bus->host_pci) && 1108 1108 ssb_read32(dev->dev->sdev, SSB_TMSHIGH) & SSB_TMSHIGH_DMA64)) 1109 - return 1; 1109 + return true; 1110 1110 #endif 1111 - return 0; 1111 + return false; 1112 1112 } 1113 1113 1114 1114 int b43_dma_init(struct b43_wldev *dev)
+3 -3
drivers/net/wireless/b43legacy/dma.c
··· 427 427 bool dma_to_device) 428 428 { 429 429 if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr))) 430 - return 1; 430 + return true; 431 431 432 432 switch (ring->type) { 433 433 case B43legacy_DMA_30BIT: ··· 441 441 } 442 442 443 443 /* The address is OK. */ 444 - return 0; 444 + return false; 445 445 446 446 address_error: 447 447 /* We can't support this address. Unmap it again. */ 448 448 unmap_descbuffer(ring, addr, buffersize, dma_to_device); 449 449 450 - return 1; 450 + return true; 451 451 } 452 452 453 453 static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
+4 -4
drivers/net/wireless/b43legacy/rfkill.c
··· 32 32 if (dev->dev->id.revision >= 3) { 33 33 if (!(b43legacy_read32(dev, B43legacy_MMIO_RADIO_HWENABLED_HI) 34 34 & B43legacy_MMIO_RADIO_HWENABLED_HI_MASK)) 35 - return 1; 35 + return true; 36 36 } else { 37 37 /* To prevent CPU fault on PPC, do not read a register 38 38 * unless the interface is started; however, on resume ··· 40 40 * that happens, unconditionally return TRUE. 41 41 */ 42 42 if (b43legacy_status(dev) < B43legacy_STAT_STARTED) 43 - return 1; 43 + return true; 44 44 if (b43legacy_read16(dev, B43legacy_MMIO_RADIO_HWENABLED_LO) 45 45 & B43legacy_MMIO_RADIO_HWENABLED_LO_MASK) 46 - return 1; 46 + return true; 47 47 } 48 - return 0; 48 + return false; 49 49 } 50 50 51 51 /* The poll callback for the hardware button. */
+1 -1
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_cmn.c
··· 2949 2949 if (ISNPHY(pi)) 2950 2950 return wlc_phy_n_txpower_ipa_ison(pi); 2951 2951 else 2952 - return 0; 2952 + return false; 2953 2953 }
+1 -1
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
··· 4999 4999 bool wlc_phy_tpc_isenabled_lcnphy(struct brcms_phy *pi) 5000 5000 { 5001 5001 if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi)) 5002 - return 0; 5002 + return false; 5003 5003 else 5004 5004 return (LCNPHY_TX_PWR_CTRL_HW == 5005 5005 wlc_lcnphy_get_tx_pwr_ctrl((pi)));
+2 -2
drivers/net/wireless/iwlwifi/iwl-config.h
··· 92 92 { 93 93 /* return 1 only for family 8000 B0 */ 94 94 if ((family == IWL_DEVICE_FAMILY_8000) && (hw_rev & 0xC)) 95 - return 1; 95 + return true; 96 96 97 - return 0; 97 + return false; 98 98 } 99 99 100 100 /*