Commit 12827fec authored by Joe Perches's avatar Joe Perches Committed by Kalle Valo

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent cad737df
...@@ -553,7 +553,7 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring, ...@@ -553,7 +553,7 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
size_t buffersize, bool dma_to_device) size_t buffersize, bool dma_to_device)
{ {
if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr))) if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr)))
return 1; return true;
switch (ring->type) { switch (ring->type) {
case B43_DMA_30BIT: case B43_DMA_30BIT:
...@@ -571,13 +571,13 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring, ...@@ -571,13 +571,13 @@ static bool b43_dma_mapping_error(struct b43_dmaring *ring,
} }
/* The address is OK. */ /* The address is OK. */
return 0; return false;
address_error: address_error:
/* We can't support this address. Unmap it again. */ /* We can't support this address. Unmap it again. */
unmap_descbuffer(ring, addr, buffersize, dma_to_device); unmap_descbuffer(ring, addr, buffersize, dma_to_device);
return 1; return true;
} }
static bool b43_rx_buffer_is_poisoned(struct b43_dmaring *ring, struct sk_buff *skb) static bool b43_rx_buffer_is_poisoned(struct b43_dmaring *ring, struct sk_buff *skb)
...@@ -1099,16 +1099,16 @@ static bool b43_dma_translation_in_low_word(struct b43_wldev *dev, ...@@ -1099,16 +1099,16 @@ static bool b43_dma_translation_in_low_word(struct b43_wldev *dev,
enum b43_dmatype type) enum b43_dmatype type)
{ {
if (type != B43_DMA_64BIT) if (type != B43_DMA_64BIT)
return 1; return true;
#ifdef CONFIG_B43_SSB #ifdef CONFIG_B43_SSB
if (dev->dev->bus_type == B43_BUS_SSB && if (dev->dev->bus_type == B43_BUS_SSB &&
dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI && dev->dev->sdev->bus->bustype == SSB_BUSTYPE_PCI &&
!(pci_is_pcie(dev->dev->sdev->bus->host_pci) && !(pci_is_pcie(dev->dev->sdev->bus->host_pci) &&
ssb_read32(dev->dev->sdev, SSB_TMSHIGH) & SSB_TMSHIGH_DMA64)) ssb_read32(dev->dev->sdev, SSB_TMSHIGH) & SSB_TMSHIGH_DMA64))
return 1; return true;
#endif #endif
return 0; return false;
} }
int b43_dma_init(struct b43_wldev *dev) int b43_dma_init(struct b43_wldev *dev)
......
...@@ -427,7 +427,7 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring, ...@@ -427,7 +427,7 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
bool dma_to_device) bool dma_to_device)
{ {
if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr))) if (unlikely(dma_mapping_error(ring->dev->dev->dma_dev, addr)))
return 1; return true;
switch (ring->type) { switch (ring->type) {
case B43legacy_DMA_30BIT: case B43legacy_DMA_30BIT:
...@@ -441,13 +441,13 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring, ...@@ -441,13 +441,13 @@ static bool b43legacy_dma_mapping_error(struct b43legacy_dmaring *ring,
} }
/* The address is OK. */ /* The address is OK. */
return 0; return false;
address_error: address_error:
/* We can't support this address. Unmap it again. */ /* We can't support this address. Unmap it again. */
unmap_descbuffer(ring, addr, buffersize, dma_to_device); unmap_descbuffer(ring, addr, buffersize, dma_to_device);
return 1; return true;
} }
static int setup_rx_descbuffer(struct b43legacy_dmaring *ring, static int setup_rx_descbuffer(struct b43legacy_dmaring *ring,
......
...@@ -32,7 +32,7 @@ bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev) ...@@ -32,7 +32,7 @@ bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev)
if (dev->dev->id.revision >= 3) { if (dev->dev->id.revision >= 3) {
if (!(b43legacy_read32(dev, B43legacy_MMIO_RADIO_HWENABLED_HI) if (!(b43legacy_read32(dev, B43legacy_MMIO_RADIO_HWENABLED_HI)
& B43legacy_MMIO_RADIO_HWENABLED_HI_MASK)) & B43legacy_MMIO_RADIO_HWENABLED_HI_MASK))
return 1; return true;
} else { } else {
/* To prevent CPU fault on PPC, do not read a register /* To prevent CPU fault on PPC, do not read a register
* unless the interface is started; however, on resume * unless the interface is started; however, on resume
...@@ -40,12 +40,12 @@ bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev) ...@@ -40,12 +40,12 @@ bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev)
* that happens, unconditionally return TRUE. * that happens, unconditionally return TRUE.
*/ */
if (b43legacy_status(dev) < B43legacy_STAT_STARTED) if (b43legacy_status(dev) < B43legacy_STAT_STARTED)
return 1; return true;
if (b43legacy_read16(dev, B43legacy_MMIO_RADIO_HWENABLED_LO) if (b43legacy_read16(dev, B43legacy_MMIO_RADIO_HWENABLED_LO)
& B43legacy_MMIO_RADIO_HWENABLED_LO_MASK) & B43legacy_MMIO_RADIO_HWENABLED_LO_MASK)
return 1; return true;
} }
return 0; return false;
} }
/* The poll callback for the hardware button. */ /* The poll callback for the hardware button. */
......
...@@ -2949,5 +2949,5 @@ bool wlc_phy_txpower_ipa_ison(struct brcms_phy_pub *ppi) ...@@ -2949,5 +2949,5 @@ bool wlc_phy_txpower_ipa_ison(struct brcms_phy_pub *ppi)
if (ISNPHY(pi)) if (ISNPHY(pi))
return wlc_phy_n_txpower_ipa_ison(pi); return wlc_phy_n_txpower_ipa_ison(pi);
else else
return 0; return false;
} }
...@@ -4999,7 +4999,7 @@ void wlc_2064_vco_cal(struct brcms_phy *pi) ...@@ -4999,7 +4999,7 @@ void wlc_2064_vco_cal(struct brcms_phy *pi)
bool wlc_phy_tpc_isenabled_lcnphy(struct brcms_phy *pi) bool wlc_phy_tpc_isenabled_lcnphy(struct brcms_phy *pi)
{ {
if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi)) if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi))
return 0; return false;
else else
return (LCNPHY_TX_PWR_CTRL_HW == return (LCNPHY_TX_PWR_CTRL_HW ==
wlc_lcnphy_get_tx_pwr_ctrl((pi))); wlc_lcnphy_get_tx_pwr_ctrl((pi)));
......
...@@ -92,9 +92,9 @@ static inline bool iwl_has_secure_boot(u32 hw_rev, ...@@ -92,9 +92,9 @@ static inline bool iwl_has_secure_boot(u32 hw_rev,
{ {
/* return 1 only for family 8000 B0 */ /* return 1 only for family 8000 B0 */
if ((family == IWL_DEVICE_FAMILY_8000) && (hw_rev & 0xC)) if ((family == IWL_DEVICE_FAMILY_8000) && (hw_rev & 0xC))
return 1; return true;
return 0; return false;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment