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

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>

authored by

Rusty Russell and committed by
David S. Miller
3db1cd5c a8e510f6

+288 -288
+4 -4
drivers/net/ethernet/broadcom/tg3.c
··· 6425 6425 bool hwbug = false; 6426 6426 6427 6427 if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8) 6428 - hwbug = 1; 6428 + hwbug = true; 6429 6429 6430 6430 if (tg3_4g_overflow_test(map, len)) 6431 - hwbug = 1; 6431 + hwbug = true; 6432 6432 6433 6433 if (tg3_40bit_overflow_test(tp, map, len)) 6434 - hwbug = 1; 6434 + hwbug = true; 6435 6435 6436 6436 if (tp->dma_limit) { 6437 6437 u32 prvidx = *entry; ··· 6464 6464 *budget -= 1; 6465 6465 *entry = NEXT_TX(*entry); 6466 6466 } else { 6467 - hwbug = 1; 6467 + hwbug = true; 6468 6468 tnapi->tx_buffers[prvidx].fragmented = false; 6469 6469 } 6470 6470 }
+3 -3
drivers/net/ethernet/brocade/bna/bnad.c
··· 723 723 bnad_cb_ethport_link_status(struct bnad *bnad, 724 724 enum bna_link_status link_status) 725 725 { 726 - bool link_up = 0; 726 + bool link_up = false; 727 727 728 728 link_up = (link_status == BNA_LINK_UP) || (link_status == BNA_CEE_UP); 729 729 ··· 3190 3190 goto disable_device; 3191 3191 if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) && 3192 3192 !dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) { 3193 - *using_dac = 1; 3193 + *using_dac = true; 3194 3194 } else { 3195 3195 err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); 3196 3196 if (err) { ··· 3199 3199 if (err) 3200 3200 goto release_regions; 3201 3201 } 3202 - *using_dac = 0; 3202 + *using_dac = false; 3203 3203 } 3204 3204 pci_set_master(pdev); 3205 3205 return 0;
+2 -2
drivers/net/ethernet/dec/tulip/de4x5.c
··· 5191 5191 struct de4x5_private *lp = netdev_priv(dev); 5192 5192 char *p, *q, t; 5193 5193 5194 - lp->params.fdx = 0; 5194 + lp->params.fdx = false; 5195 5195 lp->params.autosense = AUTO; 5196 5196 5197 5197 if (args == NULL) return; ··· 5201 5201 t = *q; 5202 5202 *q = '\0'; 5203 5203 5204 - if (strstr(p, "fdx") || strstr(p, "FDX")) lp->params.fdx = 1; 5204 + if (strstr(p, "fdx") || strstr(p, "FDX")) lp->params.fdx = true; 5205 5205 5206 5206 if (strstr(p, "autosense") || strstr(p, "AUTOSENSE")) { 5207 5207 if (strstr(p, "TP")) {
+5 -5
drivers/net/ethernet/intel/e1000/e1000_main.c
··· 1185 1185 if (global_quad_port_a != 0) 1186 1186 adapter->eeprom_wol = 0; 1187 1187 else 1188 - adapter->quad_port_a = 1; 1188 + adapter->quad_port_a = true; 1189 1189 /* Reset for multiple quad port adapters */ 1190 1190 if (++global_quad_port_a == 4) 1191 1191 global_quad_port_a = 0; ··· 1679 1679 * need this to apply a workaround later in the send path. */ 1680 1680 if (hw->mac_type == e1000_82544 && 1681 1681 hw->bus_type == e1000_bus_type_pcix) 1682 - adapter->pcix_82544 = 1; 1682 + adapter->pcix_82544 = true; 1683 1683 1684 1684 ew32(TCTL, tctl); 1685 1685 ··· 2002 2002 2003 2003 tx_ring->next_to_use = 0; 2004 2004 tx_ring->next_to_clean = 0; 2005 - tx_ring->last_tx_tso = 0; 2005 + tx_ring->last_tx_tso = false; 2006 2006 2007 2007 writel(0, hw->hw_addr + tx_ring->tdh); 2008 2008 writel(0, hw->hw_addr + tx_ring->tdt); ··· 2851 2851 * DMA'd to the controller */ 2852 2852 if (!skb->data_len && tx_ring->last_tx_tso && 2853 2853 !skb_is_gso(skb)) { 2854 - tx_ring->last_tx_tso = 0; 2854 + tx_ring->last_tx_tso = false; 2855 2855 size -= 4; 2856 2856 } 2857 2857 ··· 3219 3219 3220 3220 if (likely(tso)) { 3221 3221 if (likely(hw->mac_type != e1000_82544)) 3222 - tx_ring->last_tx_tso = 1; 3222 + tx_ring->last_tx_tso = true; 3223 3223 tx_flags |= E1000_TX_FLAGS_TSO; 3224 3224 } else if (likely(e1000_tx_csum(adapter, tx_ring, skb))) 3225 3225 tx_flags |= E1000_TX_FLAGS_CSUM;
+12 -12
drivers/net/ethernet/intel/e1000e/netdev.c
··· 859 859 u32 length, staterr; 860 860 unsigned int i; 861 861 int cleaned_count = 0; 862 - bool cleaned = 0; 862 + bool cleaned = false; 863 863 unsigned int total_rx_bytes = 0, total_rx_packets = 0; 864 864 865 865 i = rx_ring->next_to_clean; ··· 888 888 889 889 next_buffer = &rx_ring->buffer_info[i]; 890 890 891 - cleaned = 1; 891 + cleaned = true; 892 892 cleaned_count++; 893 893 dma_unmap_single(&pdev->dev, 894 894 buffer_info->dma, ··· 1157 1157 * Detect a transmit hang in hardware, this serializes the 1158 1158 * check with the clearing of time_stamp and movement of i 1159 1159 */ 1160 - adapter->detect_tx_hung = 0; 1160 + adapter->detect_tx_hung = false; 1161 1161 if (tx_ring->buffer_info[i].time_stamp && 1162 1162 time_after(jiffies, tx_ring->buffer_info[i].time_stamp 1163 1163 + (adapter->tx_timeout_factor * HZ)) && ··· 1192 1192 unsigned int i, j; 1193 1193 u32 length, staterr; 1194 1194 int cleaned_count = 0; 1195 - bool cleaned = 0; 1195 + bool cleaned = false; 1196 1196 unsigned int total_rx_bytes = 0, total_rx_packets = 0; 1197 1197 1198 1198 i = rx_ring->next_to_clean; ··· 1218 1218 1219 1219 next_buffer = &rx_ring->buffer_info[i]; 1220 1220 1221 - cleaned = 1; 1221 + cleaned = true; 1222 1222 cleaned_count++; 1223 1223 dma_unmap_single(&pdev->dev, buffer_info->dma, 1224 1224 adapter->rx_ps_bsize0, DMA_FROM_DEVICE); ··· 4257 4257 static bool e1000e_has_link(struct e1000_adapter *adapter) 4258 4258 { 4259 4259 struct e1000_hw *hw = &adapter->hw; 4260 - bool link_active = 0; 4260 + bool link_active = false; 4261 4261 s32 ret_val = 0; 4262 4262 4263 4263 /* ··· 4272 4272 ret_val = hw->mac.ops.check_for_link(hw); 4273 4273 link_active = !hw->mac.get_link_status; 4274 4274 } else { 4275 - link_active = 1; 4275 + link_active = true; 4276 4276 } 4277 4277 break; 4278 4278 case e1000_media_type_fiber: ··· 4371 4371 4372 4372 if (link) { 4373 4373 if (!netif_carrier_ok(netdev)) { 4374 - bool txb2b = 1; 4374 + bool txb2b = true; 4375 4375 4376 4376 /* Cancel scheduled suspend requests. */ 4377 4377 pm_runtime_resume(netdev->dev.parent); ··· 4404 4404 adapter->tx_timeout_factor = 1; 4405 4405 switch (adapter->link_speed) { 4406 4406 case SPEED_10: 4407 - txb2b = 0; 4407 + txb2b = false; 4408 4408 adapter->tx_timeout_factor = 16; 4409 4409 break; 4410 4410 case SPEED_100: 4411 - txb2b = 0; 4411 + txb2b = false; 4412 4412 adapter->tx_timeout_factor = 10; 4413 4413 break; 4414 4414 } ··· 4544 4544 e1000e_flush_descriptors(adapter); 4545 4545 4546 4546 /* Force detection of hung controller every watchdog period */ 4547 - adapter->detect_tx_hung = 1; 4547 + adapter->detect_tx_hung = true; 4548 4548 4549 4549 /* 4550 4550 * With 82571 controllers, LAA may be overwritten due to controller ··· 6208 6208 6209 6209 /* Initialize link parameters. User can change them with ethtool */ 6210 6210 adapter->hw.mac.autoneg = 1; 6211 - adapter->fc_autoneg = 1; 6211 + adapter->fc_autoneg = true; 6212 6212 adapter->hw.fc.requested_mode = e1000_fc_default; 6213 6213 adapter->hw.fc.current_mode = e1000_fc_default; 6214 6214 adapter->hw.phy.autoneg_advertised = 0x2f;
+1 -1
drivers/net/ethernet/intel/ixgb/ixgb_main.c
··· 228 228 if (IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_PCIX_MODE) { 229 229 err = pci_enable_msi(adapter->pdev); 230 230 if (!err) { 231 - adapter->have_msi = 1; 231 + adapter->have_msi = true; 232 232 irq_flags = 0; 233 233 } 234 234 /* proceed to try to request regular interrupt */
+1 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
··· 2599 2599 s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index) 2600 2600 { 2601 2601 ixgbe_link_speed speed = 0; 2602 - bool link_up = 0; 2602 + bool link_up = false; 2603 2603 u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC); 2604 2604 u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL); 2605 2605
+1 -1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
··· 4023 4023 4024 4024 /* Mark all the VFs as inactive */ 4025 4025 for (i = 0 ; i < adapter->num_vfs; i++) 4026 - adapter->vfinfo[i].clear_to_send = 0; 4026 + adapter->vfinfo[i].clear_to_send = false; 4027 4027 4028 4028 /* ping all the active vfs to let them know we are going down */ 4029 4029 ixgbe_ping_all_vfs(adapter);
+6 -6
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
··· 1214 1214 u32 max_retry = 10; 1215 1215 u32 retry = 0; 1216 1216 u16 swfw_mask = 0; 1217 - bool nack = 1; 1217 + bool nack = true; 1218 1218 *data = 0; 1219 1219 1220 1220 if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1) ··· 1421 1421 static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) 1422 1422 { 1423 1423 s32 i; 1424 - bool bit = 0; 1424 + bool bit = false; 1425 1425 1426 1426 for (i = 7; i >= 0; i--) { 1427 1427 ixgbe_clock_in_i2c_bit(hw, &bit); ··· 1443 1443 s32 status = 0; 1444 1444 s32 i; 1445 1445 u32 i2cctl; 1446 - bool bit = 0; 1446 + bool bit = false; 1447 1447 1448 1448 for (i = 7; i >= 0; i--) { 1449 1449 bit = (data >> i) & 0x1; ··· 1473 1473 u32 i = 0; 1474 1474 u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL); 1475 1475 u32 timeout = 10; 1476 - bool ack = 1; 1476 + bool ack = true; 1477 1477 1478 1478 ixgbe_raise_i2c_clk(hw, &i2cctl); 1479 1479 ··· 1646 1646 bool data; 1647 1647 1648 1648 if (*i2cctl & IXGBE_I2C_DATA_IN) 1649 - data = 1; 1649 + data = true; 1650 1650 else 1651 - data = 0; 1651 + data = false; 1652 1652 1653 1653 return data; 1654 1654 }
+1 -1
drivers/net/ethernet/sfc/falcon.c
··· 610 610 if (!nic_data->stats_pending) 611 611 return; 612 612 613 - nic_data->stats_pending = 0; 613 + nic_data->stats_pending = false; 614 614 if (*nic_data->stats_dma_done == FALCON_STATS_DONE) { 615 615 rmb(); /* read the done flag before the stats */ 616 616 efx->mac_op->update_stats(efx);
+3 -3
drivers/net/ethernet/sfc/mtd.c
··· 496 496 rc = efx_mcdi_nvram_update_start(efx, part->mcdi.nvram_type); 497 497 if (rc) 498 498 goto out; 499 - part->mcdi.updating = 1; 499 + part->mcdi.updating = true; 500 500 } 501 501 502 502 /* The MCDI interface can in fact do multiple erase blocks at once; ··· 528 528 rc = efx_mcdi_nvram_update_start(efx, part->mcdi.nvram_type); 529 529 if (rc) 530 530 goto out; 531 - part->mcdi.updating = 1; 531 + part->mcdi.updating = true; 532 532 } 533 533 534 534 while (offset < end) { ··· 553 553 int rc = 0; 554 554 555 555 if (part->mcdi.updating) { 556 - part->mcdi.updating = 0; 556 + part->mcdi.updating = false; 557 557 rc = efx_mcdi_nvram_update_finish(efx, part->mcdi.nvram_type); 558 558 } 559 559
+1 -1
drivers/net/ethernet/sfc/siena.c
··· 232 232 static int siena_probe_nic(struct efx_nic *efx) 233 233 { 234 234 struct siena_nic_data *nic_data; 235 - bool already_attached = 0; 235 + bool already_attached = false; 236 236 efx_oword_t reg; 237 237 int rc; 238 238
+2 -2
drivers/net/ethernet/tile/tilepro.c
··· 1256 1256 sizeof(dummy), NETIO_IPP_STOP_SHIM_OFF) < 0) 1257 1257 panic("Failed to stop LIPP/LEPP!\n"); 1258 1258 1259 - priv->partly_opened = 0; 1259 + priv->partly_opened = false; 1260 1260 } 1261 1261 1262 1262 ··· 1507 1507 priv->network_cpus_count, priv->network_cpus_credits); 1508 1508 #endif 1509 1509 1510 - priv->partly_opened = 1; 1510 + priv->partly_opened = true; 1511 1511 1512 1512 } else { 1513 1513 /* FIXME: Is this possible? */
+3 -3
drivers/net/ethernet/xilinx/xilinx_emaclite.c
··· 662 662 */ 663 663 static irqreturn_t xemaclite_interrupt(int irq, void *dev_id) 664 664 { 665 - bool tx_complete = 0; 665 + bool tx_complete = false; 666 666 struct net_device *dev = dev_id; 667 667 struct net_local *lp = netdev_priv(dev); 668 668 void __iomem *base_addr = lp->base_addr; ··· 683 683 tx_status &= ~XEL_TSR_XMIT_ACTIVE_MASK; 684 684 out_be32(base_addr + XEL_TSR_OFFSET, tx_status); 685 685 686 - tx_complete = 1; 686 + tx_complete = true; 687 687 } 688 688 689 689 /* Check if the Transmission for the second buffer is completed */ ··· 695 695 out_be32(base_addr + XEL_BUFFER_OFFSET + XEL_TSR_OFFSET, 696 696 tx_status); 697 697 698 - tx_complete = 1; 698 + tx_complete = true; 699 699 } 700 700 701 701 /* If there was a Tx interrupt, call the Tx Handler */
+4 -4
drivers/net/wimax/i2400m/tx.c
··· 562 562 { 563 563 struct device *dev = i2400m_dev(i2400m); 564 564 struct i2400m_msg_hdr *tx_msg; 565 - bool try_head = 0; 565 + bool try_head = false; 566 566 BUG_ON(i2400m->tx_msg != NULL); 567 567 /* 568 568 * In certain situations, TX queue might have enough space to ··· 580 580 else if (tx_msg == TAIL_FULL) { 581 581 i2400m_tx_skip_tail(i2400m); 582 582 d_printf(2, dev, "new TX message: tail full, trying head\n"); 583 - try_head = 1; 583 + try_head = true; 584 584 goto try_head; 585 585 } 586 586 memset(tx_msg, 0, I2400M_TX_PLD_SIZE); ··· 720 720 unsigned long flags; 721 721 size_t padded_len; 722 722 void *ptr; 723 - bool try_head = 0; 723 + bool try_head = false; 724 724 unsigned is_singleton = pl_type == I2400M_PT_RESET_WARM 725 725 || pl_type == I2400M_PT_RESET_COLD; 726 726 ··· 771 771 d_printf(2, dev, "pl append: tail full\n"); 772 772 i2400m_tx_close(i2400m); 773 773 i2400m_tx_skip_tail(i2400m); 774 - try_head = 1; 774 + try_head = true; 775 775 goto try_new; 776 776 } else if (ptr == NULL) { /* All full */ 777 777 result = -ENOSPC;
+2 -2
drivers/net/wireless/ath/ath5k/reset.c
··· 1159 1159 */ 1160 1160 if (fast && (ah->ah_radio != AR5K_RF2413) && 1161 1161 (ah->ah_radio != AR5K_RF5413)) 1162 - fast = 0; 1162 + fast = false; 1163 1163 1164 1164 /* Disable sleep clock operation 1165 1165 * to avoid register access delay on certain ··· 1185 1185 if (ret && fast) { 1186 1186 ATH5K_DBG(ah, ATH5K_DEBUG_RESET, 1187 1187 "DMA didn't stop, falling back to normal reset\n"); 1188 - fast = 0; 1188 + fast = false; 1189 1189 /* Non fatal, just continue with 1190 1190 * normal reset */ 1191 1191 ret = 0;
+1 -1
drivers/net/wireless/ath/ath6kl/init.c
··· 361 361 ath6kl_dbg(ATH6KL_DBG_TRC, "failed to request P2P " 362 362 "capabilities (%d) - assuming P2P not " 363 363 "supported\n", ret); 364 - ar->p2p = 0; 364 + ar->p2p = false; 365 365 } 366 366 } 367 367
+1 -1
drivers/net/wireless/ath/ath9k/eeprom_def.c
··· 385 385 if ((ah->hw_version.devid == AR9280_DEVID_PCI) && 386 386 ((eep->baseEepHeader.version & 0xff) > 0x0a) && 387 387 (eep->baseEepHeader.pwdclkind == 0)) 388 - ah->need_an_top2_fixup = 1; 388 + ah->need_an_top2_fixup = true; 389 389 390 390 if ((common->bus_ops->ath_bus_type == ATH_USB) && 391 391 (AR_SREV_9280(ah)))
+2 -2
drivers/net/wireless/ath/ath9k/xmit.c
··· 1929 1929 if (txq == sc->tx.txq_map[q] && 1930 1930 ++txq->pending_frames > ATH_MAX_QDEPTH && !txq->stopped) { 1931 1931 ieee80211_stop_queue(sc->hw, q); 1932 - txq->stopped = 1; 1932 + txq->stopped = true; 1933 1933 } 1934 1934 1935 1935 ath_tx_start_dma(sc, skb, txctl); ··· 1986 1986 1987 1987 if (txq->stopped && txq->pending_frames < ATH_MAX_QDEPTH) { 1988 1988 ieee80211_wake_queue(sc->hw, q); 1989 - txq->stopped = 0; 1989 + txq->stopped = false; 1990 1990 } 1991 1991 } 1992 1992
+7 -7
drivers/net/wireless/b43/dma.c
··· 890 890 else 891 891 ring->ops = &dma32_ops; 892 892 if (for_tx) { 893 - ring->tx = 1; 893 + ring->tx = true; 894 894 ring->current_slot = -1; 895 895 } else { 896 896 if (ring->index == 0) { ··· 1061 1061 static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask) 1062 1062 { 1063 1063 u64 orig_mask = mask; 1064 - bool fallback = 0; 1064 + bool fallback = false; 1065 1065 int err; 1066 1066 1067 1067 /* Try to set the DMA mask. If it fails, try falling back to a ··· 1075 1075 } 1076 1076 if (mask == DMA_BIT_MASK(64)) { 1077 1077 mask = DMA_BIT_MASK(32); 1078 - fallback = 1; 1078 + fallback = true; 1079 1079 continue; 1080 1080 } 1081 1081 if (mask == DMA_BIT_MASK(32)) { 1082 1082 mask = DMA_BIT_MASK(30); 1083 - fallback = 1; 1083 + fallback = true; 1084 1084 continue; 1085 1085 } 1086 1086 b43err(dev->wl, "The machine/kernel does not support " ··· 1307 1307 memset(meta, 0, sizeof(*meta)); 1308 1308 1309 1309 meta->skb = skb; 1310 - meta->is_last_fragment = 1; 1310 + meta->is_last_fragment = true; 1311 1311 priv_info->bouncebuffer = NULL; 1312 1312 1313 1313 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); ··· 1466 1466 should_inject_overflow(ring)) { 1467 1467 /* This TX ring is full. */ 1468 1468 ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); 1469 - ring->stopped = 1; 1469 + ring->stopped = true; 1470 1470 if (b43_debug(dev, B43_DBG_DMAVERBOSE)) { 1471 1471 b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index); 1472 1472 } ··· 1585 1585 if (ring->stopped) { 1586 1586 B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME); 1587 1587 ieee80211_wake_queue(dev->wl->hw, ring->queue_prio); 1588 - ring->stopped = 0; 1588 + ring->stopped = false; 1589 1589 if (b43_debug(dev, B43_DBG_DMAVERBOSE)) { 1590 1590 b43dbg(dev->wl, "Woke up TX ring %d\n", ring->index); 1591 1591 }
+8 -8
drivers/net/wireless/b43/leds.c
··· 74 74 if (radio_enabled) 75 75 turn_on = atomic_read(&led->state) != LED_OFF; 76 76 else 77 - turn_on = 0; 77 + turn_on = false; 78 78 if (turn_on == led->hw_state) 79 79 return; 80 80 led->hw_state = turn_on; ··· 225 225 if (sprom[led_index] == 0xFF) { 226 226 /* There is no LED information in the SPROM 227 227 * for this LED. Hardcode it here. */ 228 - *activelow = 0; 228 + *activelow = false; 229 229 switch (led_index) { 230 230 case 0: 231 231 *behaviour = B43_LED_ACTIVITY; 232 - *activelow = 1; 232 + *activelow = true; 233 233 if (dev->dev->board_vendor == PCI_VENDOR_ID_COMPAQ) 234 234 *behaviour = B43_LED_RADIO_ALL; 235 235 break; ··· 267 267 if (led->wl) { 268 268 if (dev->phy.radio_on && b43_is_hw_radio_enabled(dev)) { 269 269 b43_led_turn_on(dev, led->index, led->activelow); 270 - led->hw_state = 1; 270 + led->hw_state = true; 271 271 atomic_set(&led->state, 1); 272 272 } else { 273 273 b43_led_turn_off(dev, led->index, led->activelow); 274 - led->hw_state = 0; 274 + led->hw_state = false; 275 275 atomic_set(&led->state, 0); 276 276 } 277 277 } ··· 280 280 led = &dev->wl->leds.led_tx; 281 281 if (led->wl) { 282 282 b43_led_turn_off(dev, led->index, led->activelow); 283 - led->hw_state = 0; 283 + led->hw_state = false; 284 284 atomic_set(&led->state, 0); 285 285 } 286 286 led = &dev->wl->leds.led_rx; 287 287 if (led->wl) { 288 288 b43_led_turn_off(dev, led->index, led->activelow); 289 - led->hw_state = 0; 289 + led->hw_state = false; 290 290 atomic_set(&led->state, 0); 291 291 } 292 292 led = &dev->wl->leds.led_assoc; 293 293 if (led->wl) { 294 294 b43_led_turn_off(dev, led->index, led->activelow); 295 - led->hw_state = 0; 295 + led->hw_state = false; 296 296 atomic_set(&led->state, 0); 297 297 } 298 298
+4 -4
drivers/net/wireless/b43/lo.c
··· 826 826 const struct b43_rfatt *rfatt; 827 827 const struct b43_bbatt *bbatt; 828 828 u64 power_vector; 829 - bool table_changed = 0; 829 + bool table_changed = false; 830 830 831 831 BUILD_BUG_ON(B43_DC_LT_SIZE != 32); 832 832 B43_WARN_ON(lo->rfatt_list.len * lo->bbatt_list.len > 64); ··· 876 876 lo->dc_lt[idx] = (lo->dc_lt[idx] & 0xFF00) 877 877 | (val & 0x00FF); 878 878 } 879 - table_changed = 1; 879 + table_changed = true; 880 880 } 881 881 if (table_changed) { 882 882 /* The table changed in memory. Update the hardware table. */ ··· 938 938 unsigned long now; 939 939 unsigned long expire; 940 940 struct b43_lo_calib *cal, *tmp; 941 - bool current_item_expired = 0; 941 + bool current_item_expired = false; 942 942 bool hwpctl; 943 943 944 944 if (!lo) ··· 968 968 if (b43_compare_bbatt(&cal->bbatt, &gphy->bbatt) && 969 969 b43_compare_rfatt(&cal->rfatt, &gphy->rfatt)) { 970 970 B43_WARN_ON(current_item_expired); 971 - current_item_expired = 1; 971 + current_item_expired = true; 972 972 } 973 973 if (b43_debug(dev, B43_DBG_LO)) { 974 974 b43dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "
+50 -50
drivers/net/wireless/b43/main.c
··· 1122 1122 B43_WARN_ON((ps_flags & B43_PS_AWAKE) && (ps_flags & B43_PS_ASLEEP)); 1123 1123 1124 1124 if (ps_flags & B43_PS_ENABLED) { 1125 - hwps = 1; 1125 + hwps = true; 1126 1126 } else if (ps_flags & B43_PS_DISABLED) { 1127 - hwps = 0; 1127 + hwps = false; 1128 1128 } else { 1129 1129 //TODO: If powersave is not off and FIXME is not set and we are not in adhoc 1130 1130 // and thus is not an AP and we are associated, set bit 25 1131 1131 } 1132 1132 if (ps_flags & B43_PS_AWAKE) { 1133 - awake = 1; 1133 + awake = true; 1134 1134 } else if (ps_flags & B43_PS_ASLEEP) { 1135 - awake = 0; 1135 + awake = false; 1136 1136 } else { 1137 1137 //TODO: If the device is awake or this is an AP, or we are scanning, or FIXME, 1138 1138 // or we are associated, or FIXME, or the latest PS-Poll packet sent was ··· 1140 1140 } 1141 1141 1142 1142 /* FIXME: For now we force awake-on and hwps-off */ 1143 - hwps = 0; 1144 - awake = 1; 1143 + hwps = false; 1144 + awake = true; 1145 1145 1146 1146 macctl = b43_read32(dev, B43_MMIO_MACCTL); 1147 1147 if (hwps) ··· 1339 1339 return; 1340 1340 if (dev->noisecalc.calculation_running) 1341 1341 return; 1342 - dev->noisecalc.calculation_running = 1; 1342 + dev->noisecalc.calculation_running = true; 1343 1343 dev->noisecalc.nr_samples = 0; 1344 1344 1345 1345 b43_generate_noise_sample(dev); ··· 1408 1408 average -= 48; 1409 1409 1410 1410 dev->stats.link_noise = average; 1411 - dev->noisecalc.calculation_running = 0; 1411 + dev->noisecalc.calculation_running = false; 1412 1412 return; 1413 1413 } 1414 1414 generate_new: ··· 1424 1424 b43_power_saving_ctl_bits(dev, 0); 1425 1425 } 1426 1426 if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC)) 1427 - dev->dfq_valid = 1; 1427 + dev->dfq_valid = true; 1428 1428 } 1429 1429 1430 1430 static void handle_irq_atim_end(struct b43_wldev *dev) ··· 1433 1433 b43_write32(dev, B43_MMIO_MACCMD, 1434 1434 b43_read32(dev, B43_MMIO_MACCMD) 1435 1435 | B43_MACCMD_DFQ_VALID); 1436 - dev->dfq_valid = 0; 1436 + dev->dfq_valid = false; 1437 1437 } 1438 1438 } 1439 1439 ··· 1539 1539 unsigned int i, len, variable_len; 1540 1540 const struct ieee80211_mgmt *bcn; 1541 1541 const u8 *ie; 1542 - bool tim_found = 0; 1542 + bool tim_found = false; 1543 1543 unsigned int rate; 1544 1544 u16 ctl; 1545 1545 int antenna; ··· 1588 1588 /* A valid TIM is at least 4 bytes long. */ 1589 1589 if (ie_len < 4) 1590 1590 break; 1591 - tim_found = 1; 1591 + tim_found = true; 1592 1592 1593 1593 tim_position = sizeof(struct b43_plcp_hdr6); 1594 1594 tim_position += offsetof(struct ieee80211_mgmt, u.beacon.variable); ··· 1625 1625 if (wl->beacon0_uploaded) 1626 1626 return; 1627 1627 b43_write_beacon_template(dev, 0x68, 0x18); 1628 - wl->beacon0_uploaded = 1; 1628 + wl->beacon0_uploaded = true; 1629 1629 } 1630 1630 1631 1631 static void b43_upload_beacon1(struct b43_wldev *dev) ··· 1635 1635 if (wl->beacon1_uploaded) 1636 1636 return; 1637 1637 b43_write_beacon_template(dev, 0x468, 0x1A); 1638 - wl->beacon1_uploaded = 1; 1638 + wl->beacon1_uploaded = true; 1639 1639 } 1640 1640 1641 1641 static void handle_irq_beacon(struct b43_wldev *dev) ··· 1667 1667 if (unlikely(wl->beacon_templates_virgin)) { 1668 1668 /* We never uploaded a beacon before. 1669 1669 * Upload both templates now, but only mark one valid. */ 1670 - wl->beacon_templates_virgin = 0; 1670 + wl->beacon_templates_virgin = false; 1671 1671 b43_upload_beacon0(dev); 1672 1672 b43_upload_beacon1(dev); 1673 1673 cmd = b43_read32(dev, B43_MMIO_MACCMD); ··· 1755 1755 if (wl->current_beacon) 1756 1756 dev_kfree_skb_any(wl->current_beacon); 1757 1757 wl->current_beacon = beacon; 1758 - wl->beacon0_uploaded = 0; 1759 - wl->beacon1_uploaded = 0; 1758 + wl->beacon0_uploaded = false; 1759 + wl->beacon1_uploaded = false; 1760 1760 ieee80211_queue_work(wl->hw, &wl->beacon_update_trigger); 1761 1761 } 1762 1762 ··· 1913 1913 b43err(dev->wl, "This device does not support DMA " 1914 1914 "on your system. It will now be switched to PIO.\n"); 1915 1915 /* Fall back to PIO transfers if we get fatal DMA errors! */ 1916 - dev->use_pio = 1; 1916 + dev->use_pio = true; 1917 1917 b43_controller_restart(dev, "DMA error"); 1918 1918 return; 1919 1919 } ··· 2240 2240 filename = NULL; 2241 2241 else 2242 2242 goto err_no_pcm; 2243 - fw->pcm_request_failed = 0; 2243 + fw->pcm_request_failed = false; 2244 2244 err = b43_do_request_fw(ctx, filename, &fw->pcm); 2245 2245 if (err == -ENOENT) { 2246 2246 /* We did not find a PCM file? Not fatal, but 2247 2247 * core rev <= 10 must do without hwcrypto then. */ 2248 - fw->pcm_request_failed = 1; 2248 + fw->pcm_request_failed = true; 2249 2249 } else if (err) 2250 2250 goto err_load; 2251 2251 ··· 2535 2535 dev->wl->hw->queues = dev->wl->mac80211_initially_registered_queues; 2536 2536 dev->qos_enabled = !!modparam_qos; 2537 2537 /* Default to firmware/hardware crypto acceleration. */ 2538 - dev->hwcrypto_enabled = 1; 2538 + dev->hwcrypto_enabled = true; 2539 2539 2540 2540 if (dev->fw.opensource) { 2541 2541 u16 fwcapa; ··· 2549 2549 if (!(fwcapa & B43_FWCAPA_HWCRYPTO) || dev->fw.pcm_request_failed) { 2550 2550 b43info(dev->wl, "Hardware crypto acceleration not supported by firmware\n"); 2551 2551 /* Disable hardware crypto and fall back to software crypto. */ 2552 - dev->hwcrypto_enabled = 0; 2552 + dev->hwcrypto_enabled = false; 2553 2553 } 2554 2554 if (!(fwcapa & B43_FWCAPA_QOS)) { 2555 2555 b43info(dev->wl, "QoS not supported by firmware\n"); ··· 2557 2557 * ieee80211_unregister to make sure the networking core can 2558 2558 * properly free possible resources. */ 2559 2559 dev->wl->hw->queues = 1; 2560 - dev->qos_enabled = 0; 2560 + dev->qos_enabled = false; 2561 2561 } 2562 2562 } else { 2563 2563 b43info(dev->wl, "Loading firmware version %u.%u " ··· 3361 3361 wl->rng.name = wl->rng_name; 3362 3362 wl->rng.data_read = b43_rng_read; 3363 3363 wl->rng.priv = (unsigned long)wl; 3364 - wl->rng_initialized = 1; 3364 + wl->rng_initialized = true; 3365 3365 err = hwrng_register(&wl->rng); 3366 3366 if (err) { 3367 - wl->rng_initialized = 0; 3367 + wl->rng_initialized = false; 3368 3368 b43err(wl, "Failed to register the random " 3369 3369 "number generator (%d)\n", err); 3370 3370 } ··· 3702 3702 case IEEE80211_BAND_5GHZ: 3703 3703 if (d->phy.supports_5ghz) { 3704 3704 up_dev = d; 3705 - gmode = 0; 3705 + gmode = false; 3706 3706 } 3707 3707 break; 3708 3708 case IEEE80211_BAND_2GHZ: 3709 3709 if (d->phy.supports_2ghz) { 3710 3710 up_dev = d; 3711 - gmode = 1; 3711 + gmode = true; 3712 3712 } 3713 3713 break; 3714 3714 default: ··· 4425 4425 atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT); 4426 4426 4427 4427 #if B43_DEBUG 4428 - phy->phy_locked = 0; 4429 - phy->radio_locked = 0; 4428 + phy->phy_locked = false; 4429 + phy->radio_locked = false; 4430 4430 #endif 4431 4431 } 4432 4432 4433 4433 static void setup_struct_wldev_for_init(struct b43_wldev *dev) 4434 4434 { 4435 - dev->dfq_valid = 0; 4435 + dev->dfq_valid = false; 4436 4436 4437 4437 /* Assume the radio is enabled. If it's not enabled, the state will 4438 4438 * immediately get fixed on the first periodic work run. */ 4439 - dev->radio_hw_enable = 1; 4439 + dev->radio_hw_enable = true; 4440 4440 4441 4441 /* Stats */ 4442 4442 memset(&dev->stats, 0, sizeof(dev->stats)); ··· 4670 4670 4671 4671 if (b43_bus_host_is_pcmcia(dev->dev) || 4672 4672 b43_bus_host_is_sdio(dev->dev)) { 4673 - dev->__using_pio_transfers = 1; 4673 + dev->__using_pio_transfers = true; 4674 4674 err = b43_pio_init(dev); 4675 4675 } else if (dev->use_pio) { 4676 4676 b43warn(dev->wl, "Forced PIO by use_pio module parameter. " 4677 4677 "This should not be needed and will result in lower " 4678 4678 "performance.\n"); 4679 - dev->__using_pio_transfers = 1; 4679 + dev->__using_pio_transfers = true; 4680 4680 err = b43_pio_init(dev); 4681 4681 } else { 4682 - dev->__using_pio_transfers = 0; 4682 + dev->__using_pio_transfers = false; 4683 4683 err = b43_dma_init(dev); 4684 4684 } 4685 4685 if (err) ··· 4733 4733 b43dbg(wl, "Adding Interface type %d\n", vif->type); 4734 4734 4735 4735 dev = wl->current_dev; 4736 - wl->operating = 1; 4736 + wl->operating = true; 4737 4737 wl->vif = vif; 4738 4738 wl->if_type = vif->type; 4739 4739 memcpy(wl->mac_addr, vif->addr, ETH_ALEN); ··· 4767 4767 B43_WARN_ON(wl->vif != vif); 4768 4768 wl->vif = NULL; 4769 4769 4770 - wl->operating = 0; 4770 + wl->operating = false; 4771 4771 4772 4772 b43_adjust_opmode(dev); 4773 4773 memset(wl->mac_addr, 0, ETH_ALEN); ··· 4789 4789 memset(wl->bssid, 0, ETH_ALEN); 4790 4790 memset(wl->mac_addr, 0, ETH_ALEN); 4791 4791 wl->filter_flags = 0; 4792 - wl->radiotap_enabled = 0; 4792 + wl->radiotap_enabled = false; 4793 4793 b43_qos_clear(wl); 4794 - wl->beacon0_uploaded = 0; 4795 - wl->beacon1_uploaded = 0; 4796 - wl->beacon_templates_virgin = 1; 4797 - wl->radio_enabled = 1; 4794 + wl->beacon0_uploaded = false; 4795 + wl->beacon1_uploaded = false; 4796 + wl->beacon_templates_virgin = true; 4797 + wl->radio_enabled = true; 4798 4798 4799 4799 mutex_lock(&wl->mutex); 4800 4800 ··· 4840 4840 goto out_unlock; 4841 4841 } 4842 4842 b43_wireless_core_exit(dev); 4843 - wl->radio_enabled = 0; 4843 + wl->radio_enabled = false; 4844 4844 4845 4845 out_unlock: 4846 4846 mutex_unlock(&wl->mutex); ··· 5028 5028 struct pci_dev *pdev = NULL; 5029 5029 int err; 5030 5030 u32 tmp; 5031 - bool have_2ghz_phy = 0, have_5ghz_phy = 0; 5031 + bool have_2ghz_phy = false, have_5ghz_phy = false; 5032 5032 5033 5033 /* Do NOT do any device initialization here. 5034 5034 * Do it in wireless_core_init() instead. ··· 5071 5071 } 5072 5072 5073 5073 dev->phy.gmode = have_2ghz_phy; 5074 - dev->phy.radio_on = 1; 5074 + dev->phy.radio_on = true; 5075 5075 b43_wireless_core_reset(dev, dev->phy.gmode); 5076 5076 5077 5077 err = b43_phy_versioning(dev); ··· 5082 5082 (pdev->device != 0x4312 && 5083 5083 pdev->device != 0x4319 && pdev->device != 0x4324)) { 5084 5084 /* No multiband support. */ 5085 - have_2ghz_phy = 0; 5086 - have_5ghz_phy = 0; 5085 + have_2ghz_phy = false; 5086 + have_5ghz_phy = false; 5087 5087 switch (dev->phy.type) { 5088 5088 case B43_PHYTYPE_A: 5089 - have_5ghz_phy = 1; 5089 + have_5ghz_phy = true; 5090 5090 break; 5091 5091 case B43_PHYTYPE_LP: //FIXME not always! 5092 5092 #if 0 //FIXME enabling 5GHz causes a NULL pointer dereference ··· 5096 5096 case B43_PHYTYPE_N: 5097 5097 case B43_PHYTYPE_HT: 5098 5098 case B43_PHYTYPE_LCN: 5099 - have_2ghz_phy = 1; 5099 + have_2ghz_phy = true; 5100 5100 break; 5101 5101 default: 5102 5102 B43_WARN_ON(1); ··· 5112 5112 /* FIXME: For now we disable the A-PHY on multi-PHY devices. */ 5113 5113 if (dev->phy.type != B43_PHYTYPE_N && 5114 5114 dev->phy.type != B43_PHYTYPE_LP) { 5115 - have_2ghz_phy = 1; 5116 - have_5ghz_phy = 0; 5115 + have_2ghz_phy = true; 5116 + have_5ghz_phy = false; 5117 5117 } 5118 5118 } 5119 5119
+4 -4
drivers/net/wireless/b43/phy_common.c
··· 145 145 146 146 #if B43_DEBUG 147 147 B43_WARN_ON(dev->phy.radio_locked); 148 - dev->phy.radio_locked = 1; 148 + dev->phy.radio_locked = true; 149 149 #endif 150 150 151 151 macctl = b43_read32(dev, B43_MMIO_MACCTL); ··· 163 163 164 164 #if B43_DEBUG 165 165 B43_WARN_ON(!dev->phy.radio_locked); 166 - dev->phy.radio_locked = 0; 166 + dev->phy.radio_locked = false; 167 167 #endif 168 168 169 169 /* Commit any write */ ··· 178 178 { 179 179 #if B43_DEBUG 180 180 B43_WARN_ON(dev->phy.phy_locked); 181 - dev->phy.phy_locked = 1; 181 + dev->phy.phy_locked = true; 182 182 #endif 183 183 B43_WARN_ON(dev->dev->core_rev < 3); 184 184 ··· 190 190 { 191 191 #if B43_DEBUG 192 192 B43_WARN_ON(!dev->phy.phy_locked); 193 - dev->phy.phy_locked = 0; 193 + dev->phy.phy_locked = false; 194 194 #endif 195 195 B43_WARN_ON(dev->dev->core_rev < 3); 196 196
+17 -17
drivers/net/wireless/b43/phy_g.c
··· 897 897 if (b43_phy_read(dev, 0x0033) & 0x0800) 898 898 break; 899 899 900 - gphy->aci_enable = 1; 900 + gphy->aci_enable = true; 901 901 902 902 phy_stacksave(B43_PHY_RADIO_BITFIELD); 903 903 phy_stacksave(B43_PHY_G_CRS); ··· 1038 1038 if (!(b43_phy_read(dev, 0x0033) & 0x0800)) 1039 1039 break; 1040 1040 1041 - gphy->aci_enable = 0; 1041 + gphy->aci_enable = false; 1042 1042 1043 1043 phy_stackrestore(B43_PHY_RADIO_BITFIELD); 1044 1044 phy_stackrestore(B43_PHY_G_CRS); ··· 1956 1956 bbatt.att = 11; 1957 1957 if (phy->radio_rev == 8) { 1958 1958 rfatt.att = 15; 1959 - rfatt.with_padmix = 1; 1959 + rfatt.with_padmix = true; 1960 1960 } else { 1961 1961 rfatt.att = 9; 1962 - rfatt.with_padmix = 0; 1962 + rfatt.with_padmix = false; 1963 1963 } 1964 1964 b43_set_txpower_g(dev, &bbatt, &rfatt, 0); 1965 1965 } ··· 2137 2137 struct b43_bus_dev *bdev = dev->dev; 2138 2138 struct b43_phy *phy = &dev->phy; 2139 2139 2140 - rf->with_padmix = 0; 2140 + rf->with_padmix = false; 2141 2141 2142 2142 if (dev->dev->board_vendor == SSB_BOARDVENDOR_BCM && 2143 2143 dev->dev->board_type == SSB_BOARD_BCM4309G) { ··· 2221 2221 return; 2222 2222 case 8: 2223 2223 rf->att = 0xA; 2224 - rf->with_padmix = 1; 2224 + rf->with_padmix = true; 2225 2225 return; 2226 2226 case 9: 2227 2227 default: ··· 2389 2389 B43_WARN_ON((dev->dev->chip_id == 0x4301) && 2390 2390 (phy->radio_ver != 0x2050)); /* Not supported anymore */ 2391 2391 2392 - gphy->dyn_tssi_tbl = 0; 2392 + gphy->dyn_tssi_tbl = false; 2393 2393 2394 2394 if (pab0 != 0 && pab1 != 0 && pab2 != 0 && 2395 2395 pab0 != -1 && pab1 != -1 && pab2 != -1) { ··· 2404 2404 pab1, pab2); 2405 2405 if (!gphy->tssi2dbm) 2406 2406 return -ENOMEM; 2407 - gphy->dyn_tssi_tbl = 1; 2407 + gphy->dyn_tssi_tbl = true; 2408 2408 } else { 2409 2409 /* pabX values not set in SPROM. */ 2410 2410 gphy->tgt_idle_tssi = 52; ··· 2504 2504 2505 2505 if (gphy->dyn_tssi_tbl) 2506 2506 kfree(gphy->tssi2dbm); 2507 - gphy->dyn_tssi_tbl = 0; 2507 + gphy->dyn_tssi_tbl = false; 2508 2508 gphy->tssi2dbm = NULL; 2509 2509 2510 2510 kfree(gphy); ··· 2531 2531 if (phy->rev == 1) { 2532 2532 /* Workaround: Temporarly disable gmode through the early init 2533 2533 * phase, as the gmode stuff is not needed for phy rev 1 */ 2534 - phy->gmode = 0; 2534 + phy->gmode = false; 2535 2535 b43_wireless_core_reset(dev, 0); 2536 2536 b43_phy_initg(dev); 2537 - phy->gmode = 1; 2537 + phy->gmode = true; 2538 2538 b43_wireless_core_reset(dev, 1); 2539 2539 } 2540 2540 ··· 2613 2613 gphy->radio_off_context.rfover); 2614 2614 b43_phy_write(dev, B43_PHY_RFOVERVAL, 2615 2615 gphy->radio_off_context.rfoverval); 2616 - gphy->radio_off_context.valid = 0; 2616 + gphy->radio_off_context.valid = false; 2617 2617 } 2618 2618 channel = phy->channel; 2619 2619 b43_gphy_channel_switch(dev, 6, 1); ··· 2626 2626 rfoverval = b43_phy_read(dev, B43_PHY_RFOVERVAL); 2627 2627 gphy->radio_off_context.rfover = rfover; 2628 2628 gphy->radio_off_context.rfoverval = rfoverval; 2629 - gphy->radio_off_context.valid = 1; 2629 + gphy->radio_off_context.valid = true; 2630 2630 b43_phy_write(dev, B43_PHY_RFOVER, rfover | 0x008C); 2631 2631 b43_phy_write(dev, B43_PHY_RFOVERVAL, rfoverval & 0xFF73); 2632 2632 } ··· 2711 2711 if ((phy->rev == 0) || (!phy->gmode)) 2712 2712 return -ENODEV; 2713 2713 2714 - gphy->aci_wlan_automatic = 0; 2714 + gphy->aci_wlan_automatic = false; 2715 2715 switch (mode) { 2716 2716 case B43_INTERFMODE_AUTOWLAN: 2717 - gphy->aci_wlan_automatic = 1; 2717 + gphy->aci_wlan_automatic = true; 2718 2718 if (gphy->aci_enable) 2719 2719 mode = B43_INTERFMODE_MANUALWLAN; 2720 2720 else ··· 2735 2735 b43_radio_interference_mitigation_disable(dev, currentmode); 2736 2736 2737 2737 if (mode == B43_INTERFMODE_NONE) { 2738 - gphy->aci_enable = 0; 2739 - gphy->aci_hw_rssi = 0; 2738 + gphy->aci_enable = false; 2739 + gphy->aci_hw_rssi = false; 2740 2740 } else 2741 2741 b43_radio_interference_mitigation_enable(dev, mode); 2742 2742 gphy->interfmode = mode;
+4 -4
drivers/net/wireless/b43/phy_lp.c
··· 736 736 struct b43_phy_lp *lpphy = dev->phy.lp; 737 737 738 738 if (user) 739 - lpphy->crs_usr_disable = 1; 739 + lpphy->crs_usr_disable = true; 740 740 else 741 - lpphy->crs_sys_disable = 1; 741 + lpphy->crs_sys_disable = true; 742 742 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFF1F, 0x80); 743 743 } 744 744 ··· 747 747 struct b43_phy_lp *lpphy = dev->phy.lp; 748 748 749 749 if (user) 750 - lpphy->crs_usr_disable = 0; 750 + lpphy->crs_usr_disable = false; 751 751 else 752 - lpphy->crs_sys_disable = 0; 752 + lpphy->crs_sys_disable = false; 753 753 754 754 if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) { 755 755 if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
+2 -2
drivers/net/wireless/b43/phy_n.c
··· 3375 3375 3376 3376 if (dev->phy.rev >= 4) { 3377 3377 avoid = nphy->hang_avoid; 3378 - nphy->hang_avoid = 0; 3378 + nphy->hang_avoid = false; 3379 3379 } 3380 3380 3381 3381 b43_ntab_read_bulk(dev, B43_NTAB16(7, 0x110), 2, save); ··· 3485 3485 3486 3486 if (phy6or5x && updated[core] == 0) { 3487 3487 b43_nphy_update_tx_cal_ladder(dev, core); 3488 - updated[core] = 1; 3488 + updated[core] = true; 3489 3489 } 3490 3490 3491 3491 tmp = (params[core].ncorr[type] << 8) | 0x66;
+3 -3
drivers/net/wireless/b43/pio.c
··· 539 539 /* Not enough memory on the queue. */ 540 540 err = -EBUSY; 541 541 ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); 542 - q->stopped = 1; 542 + q->stopped = true; 543 543 goto out; 544 544 } 545 545 ··· 566 566 (q->free_packet_slots == 0)) { 567 567 /* The queue is full. */ 568 568 ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); 569 - q->stopped = 1; 569 + q->stopped = true; 570 570 } 571 571 572 572 out: ··· 601 601 602 602 if (q->stopped) { 603 603 ieee80211_wake_queue(dev->wl->hw, q->queue_prio); 604 - q->stopped = 0; 604 + q->stopped = false; 605 605 } 606 606 } 607 607
+2 -2
drivers/net/wireless/b43/xmit.c
··· 874 874 struct ieee80211_tx_info *report, 875 875 const struct b43_txstatus *status) 876 876 { 877 - bool frame_success = 1; 877 + bool frame_success = true; 878 878 int retry_limit; 879 879 880 880 /* preserve the confiured retry limit before clearing the status ··· 890 890 /* The frame was not ACKed... */ 891 891 if (!(report->flags & IEEE80211_TX_CTL_NO_ACK)) { 892 892 /* ...but we expected an ACK. */ 893 - frame_success = 0; 893 + frame_success = false; 894 894 } 895 895 } 896 896 if (status->frame_count == 0) {
+8 -8
drivers/net/wireless/b43legacy/dma.c
··· 715 715 ring->mmio_base = b43legacy_dmacontroller_base(type, controller_index); 716 716 ring->index = controller_index; 717 717 if (for_tx) { 718 - ring->tx = 1; 718 + ring->tx = true; 719 719 ring->current_slot = -1; 720 720 } else { 721 721 if (ring->index == 0) { ··· 806 806 static int b43legacy_dma_set_mask(struct b43legacy_wldev *dev, u64 mask) 807 807 { 808 808 u64 orig_mask = mask; 809 - bool fallback = 0; 809 + bool fallback = false; 810 810 int err; 811 811 812 812 /* Try to set the DMA mask. If it fails, try falling back to a ··· 820 820 } 821 821 if (mask == DMA_BIT_MASK(64)) { 822 822 mask = DMA_BIT_MASK(32); 823 - fallback = 1; 823 + fallback = true; 824 824 continue; 825 825 } 826 826 if (mask == DMA_BIT_MASK(32)) { 827 827 mask = DMA_BIT_MASK(30); 828 - fallback = 1; 828 + fallback = true; 829 829 continue; 830 830 } 831 831 b43legacyerr(dev->wl, "The machine/kernel does not support " ··· 858 858 #ifdef CONFIG_B43LEGACY_PIO 859 859 b43legacywarn(dev->wl, "DMA for this device not supported. " 860 860 "Falling back to PIO\n"); 861 - dev->__using_pio = 1; 861 + dev->__using_pio = true; 862 862 return -EAGAIN; 863 863 #else 864 864 b43legacyerr(dev->wl, "DMA for this device not supported and " ··· 1068 1068 memset(meta, 0, sizeof(*meta)); 1069 1069 1070 1070 meta->skb = skb; 1071 - meta->is_last_fragment = 1; 1071 + meta->is_last_fragment = true; 1072 1072 1073 1073 meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1); 1074 1074 /* create a bounce buffer in zone_dma on mapping failure. */ ··· 1187 1187 should_inject_overflow(ring)) { 1188 1188 /* This TX ring is full. */ 1189 1189 ieee80211_stop_queue(dev->wl->hw, txring_to_priority(ring)); 1190 - ring->stopped = 1; 1190 + ring->stopped = true; 1191 1191 if (b43legacy_debug(dev, B43legacy_DBG_DMAVERBOSE)) 1192 1192 b43legacydbg(dev->wl, "Stopped TX ring %d\n", 1193 1193 ring->index); ··· 1286 1286 if (ring->stopped) { 1287 1287 B43legacy_WARN_ON(free_slots(ring) < SLOTS_PER_PACKET); 1288 1288 ieee80211_wake_queue(dev->wl->hw, txring_to_priority(ring)); 1289 - ring->stopped = 0; 1289 + ring->stopped = false; 1290 1290 if (b43legacy_debug(dev, B43legacy_DBG_DMAVERBOSE)) 1291 1291 b43legacydbg(dev->wl, "Woke up TX ring %d\n", 1292 1292 ring->index);
+2 -2
drivers/net/wireless/b43legacy/leds.c
··· 203 203 if (sprom[i] == 0xFF) { 204 204 /* There is no LED information in the SPROM 205 205 * for this LED. Hardcode it here. */ 206 - activelow = 0; 206 + activelow = false; 207 207 switch (i) { 208 208 case 0: 209 209 behaviour = B43legacy_LED_ACTIVITY; 210 - activelow = 1; 210 + activelow = true; 211 211 if (bus->boardinfo.vendor == PCI_VENDOR_ID_COMPAQ) 212 212 behaviour = B43legacy_LED_RADIO_ALL; 213 213 break;
+32 -32
drivers/net/wireless/b43legacy/main.c
··· 722 722 macctl &= ~B43legacy_MACCTL_GMODE; 723 723 if (flags & B43legacy_TMSLOW_GMODE) { 724 724 macctl |= B43legacy_MACCTL_GMODE; 725 - dev->phy.gmode = 1; 725 + dev->phy.gmode = true; 726 726 } else 727 - dev->phy.gmode = 0; 727 + dev->phy.gmode = false; 728 728 macctl |= B43legacy_MACCTL_IHR_ENABLED; 729 729 b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl); 730 730 } ··· 811 811 if (dev->noisecalc.calculation_running) 812 812 return; 813 813 dev->noisecalc.channel_at_start = dev->phy.channel; 814 - dev->noisecalc.calculation_running = 1; 814 + dev->noisecalc.calculation_running = true; 815 815 dev->noisecalc.nr_samples = 0; 816 816 817 817 b43legacy_generate_noise_sample(dev); ··· 873 873 874 874 dev->stats.link_noise = average; 875 875 drop_calculation: 876 - dev->noisecalc.calculation_running = 0; 876 + dev->noisecalc.calculation_running = false; 877 877 return; 878 878 } 879 879 generate_new: ··· 889 889 b43legacy_power_saving_ctl_bits(dev, -1, -1); 890 890 } 891 891 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC)) 892 - dev->dfq_valid = 1; 892 + dev->dfq_valid = true; 893 893 } 894 894 895 895 static void handle_irq_atim_end(struct b43legacy_wldev *dev) ··· 898 898 b43legacy_write32(dev, B43legacy_MMIO_MACCMD, 899 899 b43legacy_read32(dev, B43legacy_MMIO_MACCMD) 900 900 | B43legacy_MACCMD_DFQ_VALID); 901 - dev->dfq_valid = 0; 901 + dev->dfq_valid = false; 902 902 } 903 903 } 904 904 ··· 971 971 unsigned int i, len, variable_len; 972 972 const struct ieee80211_mgmt *bcn; 973 973 const u8 *ie; 974 - bool tim_found = 0; 974 + bool tim_found = false; 975 975 unsigned int rate; 976 976 u16 ctl; 977 977 int antenna; ··· 1019 1019 /* A valid TIM is at least 4 bytes long. */ 1020 1020 if (ie_len < 4) 1021 1021 break; 1022 - tim_found = 1; 1022 + tim_found = true; 1023 1023 1024 1024 tim_position = sizeof(struct b43legacy_plcp_hdr6); 1025 1025 tim_position += offsetof(struct ieee80211_mgmt, ··· 1172 1172 * but we don't use that feature anyway. */ 1173 1173 b43legacy_write_probe_resp_template(dev, 0x268, 0x4A, 1174 1174 &__b43legacy_ratetable[3]); 1175 - wl->beacon0_uploaded = 1; 1175 + wl->beacon0_uploaded = true; 1176 1176 } 1177 1177 1178 1178 static void b43legacy_upload_beacon1(struct b43legacy_wldev *dev) ··· 1182 1182 if (wl->beacon1_uploaded) 1183 1183 return; 1184 1184 b43legacy_write_beacon_template(dev, 0x468, 0x1A); 1185 - wl->beacon1_uploaded = 1; 1185 + wl->beacon1_uploaded = true; 1186 1186 } 1187 1187 1188 1188 static void handle_irq_beacon(struct b43legacy_wldev *dev) ··· 1212 1212 if (unlikely(wl->beacon_templates_virgin)) { 1213 1213 /* We never uploaded a beacon before. 1214 1214 * Upload both templates now, but only mark one valid. */ 1215 - wl->beacon_templates_virgin = 0; 1215 + wl->beacon_templates_virgin = false; 1216 1216 b43legacy_upload_beacon0(dev); 1217 1217 b43legacy_upload_beacon1(dev); 1218 1218 cmd = b43legacy_read32(dev, B43legacy_MMIO_MACCMD); ··· 1275 1275 if (wl->current_beacon) 1276 1276 dev_kfree_skb_any(wl->current_beacon); 1277 1277 wl->current_beacon = beacon; 1278 - wl->beacon0_uploaded = 0; 1279 - wl->beacon1_uploaded = 0; 1278 + wl->beacon0_uploaded = false; 1279 + wl->beacon1_uploaded = false; 1280 1280 ieee80211_queue_work(wl->hw, &wl->beacon_update_trigger); 1281 1281 } 1282 1282 ··· 2510 2510 if (d->phy.possible_phymodes & phymode) { 2511 2511 /* Ok, this device supports the PHY-mode. 2512 2512 * Set the gmode bit. */ 2513 - *gmode = 1; 2513 + *gmode = true; 2514 2514 *dev = d; 2515 2515 2516 2516 return 0; ··· 2546 2546 struct b43legacy_wldev *uninitialized_var(up_dev); 2547 2547 struct b43legacy_wldev *down_dev; 2548 2548 int err; 2549 - bool gmode = 0; 2549 + bool gmode = false; 2550 2550 int prev_status; 2551 2551 2552 2552 err = find_wldev_for_phymode(wl, new_mode, &up_dev, &gmode); ··· 3044 3044 3045 3045 /* Assume the radio is enabled. If it's not enabled, the state will 3046 3046 * immediately get fixed on the first periodic work run. */ 3047 - dev->radio_hw_enable = 1; 3047 + dev->radio_hw_enable = true; 3048 3048 3049 3049 phy->savedpctlreg = 0xFFFF; 3050 - phy->aci_enable = 0; 3051 - phy->aci_wlan_automatic = 0; 3052 - phy->aci_hw_rssi = 0; 3050 + phy->aci_enable = false; 3051 + phy->aci_wlan_automatic = false; 3052 + phy->aci_hw_rssi = false; 3053 3053 3054 3054 lo = phy->_lo_pairs; 3055 3055 if (lo) ··· 3081 3081 static void setup_struct_wldev_for_init(struct b43legacy_wldev *dev) 3082 3082 { 3083 3083 /* Flags */ 3084 - dev->dfq_valid = 0; 3084 + dev->dfq_valid = false; 3085 3085 3086 3086 /* Stats */ 3087 3087 memset(&dev->stats, 0, sizeof(dev->stats)); ··· 3187 3187 phy->lofcal = 0xFFFF; 3188 3188 phy->initval = 0xFFFF; 3189 3189 3190 - phy->aci_enable = 0; 3191 - phy->aci_wlan_automatic = 0; 3192 - phy->aci_hw_rssi = 0; 3190 + phy->aci_enable = false; 3191 + phy->aci_wlan_automatic = false; 3192 + phy->aci_hw_rssi = false; 3193 3193 3194 3194 phy->antenna_diversity = 0xFFFF; 3195 3195 memset(phy->minlowsig, 0xFF, sizeof(phy->minlowsig)); ··· 3355 3355 b43legacydbg(wl, "Adding Interface type %d\n", vif->type); 3356 3356 3357 3357 dev = wl->current_dev; 3358 - wl->operating = 1; 3358 + wl->operating = true; 3359 3359 wl->vif = vif; 3360 3360 wl->if_type = vif->type; 3361 3361 memcpy(wl->mac_addr, vif->addr, ETH_ALEN); ··· 3389 3389 B43legacy_WARN_ON(wl->vif != vif); 3390 3390 wl->vif = NULL; 3391 3391 3392 - wl->operating = 0; 3392 + wl->operating = false; 3393 3393 3394 3394 spin_lock_irqsave(&wl->irq_lock, flags); 3395 3395 b43legacy_adjust_opmode(dev); ··· 3413 3413 memset(wl->bssid, 0, ETH_ALEN); 3414 3414 memset(wl->mac_addr, 0, ETH_ALEN); 3415 3415 wl->filter_flags = 0; 3416 - wl->beacon0_uploaded = 0; 3417 - wl->beacon1_uploaded = 0; 3418 - wl->beacon_templates_virgin = 1; 3419 - wl->radio_enabled = 1; 3416 + wl->beacon0_uploaded = false; 3417 + wl->beacon1_uploaded = false; 3418 + wl->beacon_templates_virgin = true; 3419 + wl->radio_enabled = true; 3420 3420 3421 3421 mutex_lock(&wl->mutex); 3422 3422 ··· 3455 3455 if (b43legacy_status(dev) >= B43legacy_STAT_STARTED) 3456 3456 b43legacy_wireless_core_stop(dev); 3457 3457 b43legacy_wireless_core_exit(dev); 3458 - wl->radio_enabled = 0; 3458 + wl->radio_enabled = false; 3459 3459 mutex_unlock(&wl->mutex); 3460 3460 } 3461 3461 ··· 3614 3614 have_bphy = 1; 3615 3615 3616 3616 dev->phy.gmode = (have_gphy || have_bphy); 3617 - dev->phy.radio_on = 1; 3617 + dev->phy.radio_on = true; 3618 3618 tmp = dev->phy.gmode ? B43legacy_TMSLOW_GMODE : 0; 3619 3619 b43legacy_wireless_core_reset(dev, tmp); 3620 3620 ··· 3705 3705 (void (*)(unsigned long))b43legacy_interrupt_tasklet, 3706 3706 (unsigned long)wldev); 3707 3707 if (modparam_pio) 3708 - wldev->__using_pio = 1; 3708 + wldev->__using_pio = true; 3709 3709 INIT_LIST_HEAD(&wldev->list); 3710 3710 3711 3711 err = b43legacy_wireless_core_attach(wldev);
+10 -10
drivers/net/wireless/b43legacy/radio.c
··· 1067 1067 if (b43legacy_phy_read(dev, 0x0033) & 0x0800) 1068 1068 break; 1069 1069 1070 - phy->aci_enable = 1; 1070 + phy->aci_enable = true; 1071 1071 1072 1072 phy_stacksave(B43legacy_PHY_RADIO_BITFIELD); 1073 1073 phy_stacksave(B43legacy_PHY_G_CRS); ··· 1279 1279 if (!(b43legacy_phy_read(dev, 0x0033) & 0x0800)) 1280 1280 break; 1281 1281 1282 - phy->aci_enable = 0; 1282 + phy->aci_enable = false; 1283 1283 1284 1284 phy_stackrestore(B43legacy_PHY_RADIO_BITFIELD); 1285 1285 phy_stackrestore(B43legacy_PHY_G_CRS); ··· 1346 1346 (phy->rev == 0) || (!phy->gmode)) 1347 1347 return -ENODEV; 1348 1348 1349 - phy->aci_wlan_automatic = 0; 1349 + phy->aci_wlan_automatic = false; 1350 1350 switch (mode) { 1351 1351 case B43legacy_RADIO_INTERFMODE_AUTOWLAN: 1352 - phy->aci_wlan_automatic = 1; 1352 + phy->aci_wlan_automatic = true; 1353 1353 if (phy->aci_enable) 1354 1354 mode = B43legacy_RADIO_INTERFMODE_MANUALWLAN; 1355 1355 else ··· 1371 1371 currentmode); 1372 1372 1373 1373 if (mode == B43legacy_RADIO_INTERFMODE_NONE) { 1374 - phy->aci_enable = 0; 1375 - phy->aci_hw_rssi = 0; 1374 + phy->aci_enable = false; 1375 + phy->aci_hw_rssi = false; 1376 1376 } else 1377 1377 b43legacy_radio_interference_mitigation_enable(dev, mode); 1378 1378 phy->interfmode = mode; ··· 2102 2102 phy->radio_off_context.rfover); 2103 2103 b43legacy_phy_write(dev, B43legacy_PHY_RFOVERVAL, 2104 2104 phy->radio_off_context.rfoverval); 2105 - phy->radio_off_context.valid = 0; 2105 + phy->radio_off_context.valid = false; 2106 2106 } 2107 2107 channel = phy->channel; 2108 2108 err = b43legacy_radio_selectchannel(dev, ··· 2113 2113 default: 2114 2114 B43legacy_BUG_ON(1); 2115 2115 } 2116 - phy->radio_on = 1; 2116 + phy->radio_on = true; 2117 2117 } 2118 2118 2119 2119 void b43legacy_radio_turn_off(struct b43legacy_wldev *dev, bool force) ··· 2131 2131 if (!force) { 2132 2132 phy->radio_off_context.rfover = rfover; 2133 2133 phy->radio_off_context.rfoverval = rfoverval; 2134 - phy->radio_off_context.valid = 1; 2134 + phy->radio_off_context.valid = true; 2135 2135 } 2136 2136 b43legacy_phy_write(dev, B43legacy_PHY_RFOVER, rfover | 0x008C); 2137 2137 b43legacy_phy_write(dev, B43legacy_PHY_RFOVERVAL, 2138 2138 rfoverval & 0xFF73); 2139 2139 } else 2140 2140 b43legacy_phy_write(dev, 0x0015, 0xAA00); 2141 - phy->radio_on = 0; 2141 + phy->radio_on = false; 2142 2142 b43legacydbg(dev->wl, "Radio initialized\n"); 2143 2143 } 2144 2144
+2 -2
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
··· 805 805 return 0; 806 806 807 807 /* Set state and stop OS transmissions */ 808 - drvr->up = 0; 808 + drvr->up = false; 809 809 netif_stop_queue(ndev); 810 810 811 811 return 0; ··· 842 842 } 843 843 /* Allow transmit calls */ 844 844 netif_start_queue(ndev); 845 - drvr_priv->pub.up = 1; 845 + drvr_priv->pub.up = true; 846 846 if (brcmf_cfg80211_up(drvr_priv->pub.config)) { 847 847 brcmf_dbg(ERROR, "failed to bring up cfg80211\n"); 848 848 return -1;
+2 -2
drivers/net/wireless/brcm80211/brcmsmac/dma.c
··· 641 641 /* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */ 642 642 if ((core->id.id == SDIOD_CORE_ID) 643 643 && ((rev > 0) && (rev <= 2))) 644 - di->addrext = 0; 644 + di->addrext = false; 645 645 else if ((core->id.id == I2S_CORE_ID) && 646 646 ((rev == 0) || (rev == 1))) 647 - di->addrext = 0; 647 + di->addrext = false; 648 648 else 649 649 di->addrext = _dma_isaddrext(di); 650 650
+1 -1
drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
··· 1265 1265 brcms_c_reset(wl->wlc); 1266 1266 1267 1267 /* dpc will not be rescheduled */ 1268 - wl->resched = 0; 1268 + wl->resched = false; 1269 1269 1270 1270 return 0; 1271 1271 }
+16 -16
drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
··· 1603 1603 si_pmu_pllupd(pi->sh->sih); 1604 1604 write_phy_reg(pi, 0x942, 0); 1605 1605 wlc_lcnphy_txrx_spur_avoidance_mode(pi, false); 1606 - pi_lcn->lcnphy_spurmod = 0; 1606 + pi_lcn->lcnphy_spurmod = false; 1607 1607 mod_phy_reg(pi, 0x424, (0xff << 8), (0x1b) << 8); 1608 1608 1609 1609 write_phy_reg(pi, 0x425, 0x5907); ··· 1616 1616 write_phy_reg(pi, 0x942, 0); 1617 1617 wlc_lcnphy_txrx_spur_avoidance_mode(pi, true); 1618 1618 1619 - pi_lcn->lcnphy_spurmod = 0; 1619 + pi_lcn->lcnphy_spurmod = false; 1620 1620 mod_phy_reg(pi, 0x424, (0xff << 8), (0x1f) << 8); 1621 1621 1622 1622 write_phy_reg(pi, 0x425, 0x590a); ··· 2325 2325 { 2326 2326 s8 index, delta_brd, delta_temp, new_index, tempcorrx; 2327 2327 s16 manp, meas_temp, temp_diff; 2328 - bool neg = 0; 2328 + bool neg = false; 2329 2329 u16 temp; 2330 2330 struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; 2331 2331 ··· 2348 2348 manp = LCNPHY_TEMPSENSE(pi_lcn->lcnphy_rawtempsense); 2349 2349 temp_diff = manp - meas_temp; 2350 2350 if (temp_diff < 0) { 2351 - neg = 1; 2351 + neg = true; 2352 2352 temp_diff = -temp_diff; 2353 2353 } 2354 2354 ··· 3682 3682 wlc_lcnphy_set_cc(pi, cal_type, phy_c15, phy_c16); 3683 3683 udelay(20); 3684 3684 for (phy_c8 = 0; phy_c7 != 0 && phy_c8 < num_levels; phy_c8++) { 3685 - phy_c23 = 1; 3686 - phy_c22 = 0; 3685 + phy_c23 = true; 3686 + phy_c22 = false; 3687 3687 switch (cal_type) { 3688 3688 case 0: 3689 3689 phy_c10 = 511; ··· 3701 3701 3702 3702 phy_c9 = read_phy_reg(pi, 0x93d); 3703 3703 phy_c9 = 2 * phy_c9; 3704 - phy_c24 = 0; 3704 + phy_c24 = false; 3705 3705 phy_c5 = 7; 3706 - phy_c25 = 1; 3706 + phy_c25 = true; 3707 3707 while (1) { 3708 3708 write_radio_reg(pi, RADIO_2064_REG026, 3709 3709 (phy_c5 & 0x7) | ((phy_c5 & 0x7) << 4)); 3710 3710 udelay(50); 3711 - phy_c22 = 0; 3711 + phy_c22 = false; 3712 3712 ptr[130] = 0; 3713 3713 wlc_lcnphy_samp_cap(pi, 1, phy_c9, &ptr[0], 2); 3714 3714 if (ptr[130] == 1) 3715 - phy_c22 = 1; 3715 + phy_c22 = true; 3716 3716 if (phy_c22) 3717 3717 phy_c5 -= 1; 3718 3718 if ((phy_c22 != phy_c24) && (!phy_c25)) ··· 3722 3722 if (phy_c5 <= 0 || phy_c5 >= 7) 3723 3723 break; 3724 3724 phy_c24 = phy_c22; 3725 - phy_c25 = 0; 3725 + phy_c25 = false; 3726 3726 } 3727 3727 3728 3728 if (phy_c5 < 0) ··· 3773 3773 phy_c13 = phy_c11; 3774 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 3780 phy_c15 = phy_c13; 3781 3781 phy_c16 = phy_c14; 3782 3782 phy_c7 = phy_c7 >> 1; ··· 3966 3966 { 3967 3967 u16 tempsenseval1, tempsenseval2; 3968 3968 s16 avg = 0; 3969 - bool suspend = 0; 3969 + bool suspend = false; 3970 3970 3971 3971 if (mode == 1) { 3972 3972 suspend = (0 == (bcma_read32(pi->d11core, ··· 4008 4008 { 4009 4009 u16 tempsenseval1, tempsenseval2; 4010 4010 s32 avg = 0; 4011 - bool suspend = 0; 4011 + bool suspend = false; 4012 4012 u16 SAVE_txpwrctrl = wlc_lcnphy_get_tx_pwr_ctrl(pi); 4013 4013 struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; 4014 4014 ··· 4076 4076 { 4077 4077 u16 vbatsenseval; 4078 4078 s32 avg = 0; 4079 - bool suspend = 0; 4079 + bool suspend = false; 4080 4080 4081 4081 if (mode == 1) { 4082 4082 suspend = (0 == (bcma_read32(pi->d11core,
+1 -1
drivers/net/wireless/iwmc3200wifi/main.c
··· 130 130 iwm_invalidate_mlme_profile(iwm); 131 131 132 132 clear_bit(IWM_STATUS_ASSOCIATED, &iwm->status); 133 - iwm->umac_profile_active = 0; 133 + iwm->umac_profile_active = false; 134 134 memset(iwm->bssid, 0, ETH_ALEN); 135 135 iwm->channel = 0; 136 136
+6 -6
drivers/net/wireless/iwmc3200wifi/rx.c
··· 660 660 clear_bit(IWM_STATUS_SME_CONNECTING, &iwm->status); 661 661 clear_bit(IWM_STATUS_ASSOCIATED, &iwm->status); 662 662 663 - iwm->umac_profile_active = 0; 663 + iwm->umac_profile_active = false; 664 664 memset(iwm->bssid, 0, ETH_ALEN); 665 665 iwm->channel = 0; 666 666 ··· 735 735 umac_sta->mac_addr, 736 736 umac_sta->flags & UMAC_STA_FLAG_QOS); 737 737 738 - sta->valid = 1; 738 + sta->valid = true; 739 739 sta->qos = umac_sta->flags & UMAC_STA_FLAG_QOS; 740 740 sta->color = GET_VAL8(umac_sta->sta_id, LMAC_STA_COLOR); 741 741 memcpy(sta->addr, umac_sta->mac_addr, ETH_ALEN); ··· 750 750 sta = &iwm->sta_table[GET_VAL8(umac_sta->sta_id, LMAC_STA_ID)]; 751 751 752 752 if (!memcmp(sta->addr, umac_sta->mac_addr, ETH_ALEN)) 753 - sta->valid = 0; 753 + sta->valid = false; 754 754 755 755 break; 756 756 case UMAC_OPCODE_CLEAR_ALL: 757 757 for (i = 0; i < IWM_STA_TABLE_NUM; i++) 758 - iwm->sta_table[i].valid = 0; 758 + iwm->sta_table[i].valid = false; 759 759 760 760 break; 761 761 default: ··· 1203 1203 1204 1204 switch (hdr->oid) { 1205 1205 case UMAC_WIFI_IF_CMD_SET_PROFILE: 1206 - iwm->umac_profile_active = 1; 1206 + iwm->umac_profile_active = true; 1207 1207 break; 1208 1208 default: 1209 1209 break; ··· 1363 1363 */ 1364 1364 list_for_each_entry(cmd, &iwm->nonwifi_pending_cmd, pending) 1365 1365 if (cmd->seq_num == seq_num) { 1366 - cmd->resp_received = 1; 1366 + cmd->resp_received = true; 1367 1367 cmd->buf.len = buf_size; 1368 1368 memcpy(cmd->buf.hdr, buf, buf_size); 1369 1369 wake_up_interruptible(&iwm->nonwifi_queue);
+2 -2
drivers/net/wireless/libertas/if_cs.c
··· 859 859 * Most of the libertas cards can do unaligned register access, but some 860 860 * weird ones cannot. That's especially true for the CF8305 card. 861 861 */ 862 - card->align_regs = 0; 862 + card->align_regs = false; 863 863 864 864 card->model = get_model(p_dev->manf_id, p_dev->card_id); 865 865 if (card->model == MODEL_UNKNOWN) { ··· 871 871 /* Check if we have a current silicon */ 872 872 prod_id = if_cs_read8(card, IF_CS_PRODUCT_ID); 873 873 if (card->model == MODEL_8305) { 874 - card->align_regs = 1; 874 + card->align_regs = true; 875 875 if (prod_id < IF_CS_CF8305_B1_REV) { 876 876 pr_err("8305 rev B0 and older are not supported\n"); 877 877 ret = -ENODEV;
+2 -2
drivers/net/wireless/libertas_tf/main.c
··· 719 719 return; 720 720 721 721 if (skb_queue_empty(&priv->bc_ps_buf)) { 722 - bool tx_buff_bc = 0; 722 + bool tx_buff_bc = false; 723 723 724 724 while ((skb = ieee80211_get_buffered_bc(priv->hw, priv->vif))) { 725 725 skb_queue_tail(&priv->bc_ps_buf, skb); 726 - tx_buff_bc = 1; 726 + tx_buff_bc = true; 727 727 } 728 728 if (tx_buff_bc) { 729 729 ieee80211_stop_queues(priv->hw);
+2 -2
drivers/net/wireless/mac80211_hwsim.c
··· 708 708 { 709 709 struct mac80211_hwsim_data *data = hw->priv; 710 710 wiphy_debug(hw->wiphy, "%s\n", __func__); 711 - data->started = 1; 711 + data->started = true; 712 712 return 0; 713 713 } 714 714 ··· 716 716 static void mac80211_hwsim_stop(struct ieee80211_hw *hw) 717 717 { 718 718 struct mac80211_hwsim_data *data = hw->priv; 719 - data->started = 0; 719 + data->started = false; 720 720 del_timer(&data->beacon_timer); 721 721 wiphy_debug(hw->wiphy, "%s\n", __func__); 722 722 }
+4 -4
drivers/net/wireless/mwl8k.c
··· 738 738 739 739 ready_code = ioread32(priv->regs + MWL8K_HIU_INT_CODE); 740 740 if (ready_code == MWL8K_FWAP_READY) { 741 - priv->ap_fw = 1; 741 + priv->ap_fw = true; 742 742 break; 743 743 } else if (ready_code == MWL8K_FWSTA_READY) { 744 - priv->ap_fw = 0; 744 + priv->ap_fw = false; 745 745 break; 746 746 } 747 747 ··· 5517 5517 INIT_LIST_HEAD(&priv->vif_list); 5518 5518 5519 5519 /* Set default radio state and preamble */ 5520 - priv->radio_on = 0; 5521 - priv->radio_short_preamble = 0; 5520 + priv->radio_on = false; 5521 + priv->radio_short_preamble = false; 5522 5522 5523 5523 /* Finalize join worker */ 5524 5524 INIT_WORK(&priv->finalize_join_worker, mwl8k_finalize_join_worker);
+1 -1
drivers/net/wireless/rtlwifi/base.c
··· 396 396 u8 valid = 0; 397 397 398 398 /*set init state to on */ 399 - rtlpriv->rfkill.rfkill_state = 1; 399 + rtlpriv->rfkill.rfkill_state = true; 400 400 wiphy_rfkill_set_hw_state(hw->wiphy, 0); 401 401 402 402 radio_state = rtlpriv->cfg->ops->radio_onoff_checking(hw, &valid);
+3 -3
drivers/net/wireless/rtlwifi/pci.c
··· 78 78 u8 init_aspm; 79 79 80 80 ppsc->reg_rfps_level = 0; 81 - ppsc->support_aspm = 0; 81 + ppsc->support_aspm = false; 82 82 83 83 /*Update PCI ASPM setting */ 84 84 ppsc->const_amdpci_aspm = rtlpci->const_amdpci_aspm; ··· 570 570 if (ieee80211_is_nullfunc(fc)) { 571 571 if (ieee80211_has_pm(fc)) { 572 572 rtlpriv->mac80211.offchan_delay = true; 573 - rtlpriv->psc.state_inap = 1; 573 + rtlpriv->psc.state_inap = true; 574 574 } else { 575 - rtlpriv->psc.state_inap = 0; 575 + rtlpriv->psc.state_inap = false; 576 576 } 577 577 } 578 578
+2 -2
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
··· 98 98 99 99 rtl8192ce_bt_reg_init(hw); 100 100 101 - rtlpriv->dm.dm_initialgain_enable = 1; 101 + rtlpriv->dm.dm_initialgain_enable = true; 102 102 rtlpriv->dm.dm_flag = 0; 103 - rtlpriv->dm.disable_framebursting = 0; 103 + rtlpriv->dm.disable_framebursting = false; 104 104 rtlpriv->dm.thermalvalue = 0; 105 105 rtlpci->transmit_config = CFENDFORM | BIT(12) | BIT(13); 106 106
+1 -1
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
··· 2436 2436 "%x\n", ppsc->hwradiooff, e_rfpowerstate_toset)); 2437 2437 } 2438 2438 if (actuallyset) { 2439 - ppsc->hwradiooff = 1; 2439 + ppsc->hwradiooff = true; 2440 2440 if (e_rfpowerstate_toset == ERFON) { 2441 2441 if ((ppsc->reg_rfps_level & RT_RF_OFF_LEVL_ASPM) && 2442 2442 RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_ASPM))
+2 -2
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
··· 57 57 const struct firmware *firmware; 58 58 int err; 59 59 60 - rtlpriv->dm.dm_initialgain_enable = 1; 60 + rtlpriv->dm.dm_initialgain_enable = true; 61 61 rtlpriv->dm.dm_flag = 0; 62 - rtlpriv->dm.disable_framebursting = 0; 62 + rtlpriv->dm.disable_framebursting = false; 63 63 rtlpriv->dm.thermalvalue = 0; 64 64 rtlpriv->dbg.global_debuglevel = rtlpriv->cfg->mod_params->debug; 65 65 rtlpriv->rtlhal.pfirmware = vmalloc(0x4000);
+2 -2
drivers/net/wireless/rtlwifi/rtl8192de/sw.c
··· 99 99 100 100 rtlpriv->dm.dm_initialgain_enable = true; 101 101 rtlpriv->dm.dm_flag = 0; 102 - rtlpriv->dm.disable_framebursting = 0; 102 + rtlpriv->dm.disable_framebursting = false; 103 103 rtlpriv->dm.thermalvalue = 0; 104 - rtlpriv->dm.useramask = 1; 104 + rtlpriv->dm.useramask = true; 105 105 106 106 /* dual mac */ 107 107 if (rtlpriv->rtlhal.current_bandtype == BAND_ON_5G)
+2 -2
drivers/net/wireless/rtlwifi/rtl8192se/sw.c
··· 98 98 int err = 0; 99 99 u16 earlyrxthreshold = 7; 100 100 101 - rtlpriv->dm.dm_initialgain_enable = 1; 101 + rtlpriv->dm.dm_initialgain_enable = true; 102 102 rtlpriv->dm.dm_flag = 0; 103 - rtlpriv->dm.disable_framebursting = 0; 103 + rtlpriv->dm.disable_framebursting = false; 104 104 rtlpriv->dm.thermalvalue = 0; 105 105 rtlpriv->dm.useramask = true; 106 106
+1 -1
net/caif/caif_usb.c
··· 179 179 &layer, &caif_usb_type.func); 180 180 if (!pack_added) 181 181 dev_add_pack(&caif_usb_type); 182 - pack_added = 1; 182 + pack_added = true; 183 183 184 184 strncpy(layer->name, dev->name, 185 185 sizeof(layer->name) - 1);
+8 -8
net/dccp/feat.c
··· 490 490 new->feat_num = feat; 491 491 new->is_local = local; 492 492 new->state = FEAT_INITIALISING; 493 - new->needs_confirm = 0; 494 - new->empty_confirm = 0; 493 + new->needs_confirm = false; 494 + new->empty_confirm = false; 495 495 new->val = *fval; 496 496 new->needs_mandatory = mandatory; 497 497 ··· 517 517 new->feat_num = feat; 518 518 new->is_local = local; 519 519 new->state = FEAT_STABLE; /* transition in 6.6.2 */ 520 - new->needs_confirm = 1; 520 + new->needs_confirm = true; 521 521 new->empty_confirm = (fval == NULL); 522 522 new->val.nn = 0; /* zeroes the whole structure */ 523 523 if (!new->empty_confirm) 524 524 new->val = *fval; 525 - new->needs_mandatory = 0; 525 + new->needs_mandatory = false; 526 526 527 527 return 0; 528 528 } ··· 1155 1155 } 1156 1156 1157 1157 if (dccp_feat_reconcile(&entry->val, val, len, server, true)) { 1158 - entry->empty_confirm = 0; 1158 + entry->empty_confirm = false; 1159 1159 } else if (is_mandatory) { 1160 1160 return DCCP_RESET_CODE_MANDATORY_ERROR; 1161 1161 } else if (entry->state == FEAT_INITIALISING) { ··· 1171 1171 defval = dccp_feat_default_value(feat); 1172 1172 if (!dccp_feat_reconcile(&entry->val, &defval, 1, server, true)) 1173 1173 return DCCP_RESET_CODE_OPTION_ERROR; 1174 - entry->empty_confirm = 1; 1174 + entry->empty_confirm = true; 1175 1175 } 1176 - entry->needs_confirm = 1; 1177 - entry->needs_mandatory = 0; 1176 + entry->needs_confirm = true; 1177 + entry->needs_mandatory = false; 1178 1178 entry->state = FEAT_STABLE; 1179 1179 return 0; 1180 1180
+1 -1
net/dccp/options.c
··· 544 544 } 545 545 546 546 if (unlikely(val == NULL || len == 0)) 547 - len = repeat_first = 0; 547 + len = repeat_first = false; 548 548 tot_len = 3 + repeat_first + len; 549 549 550 550 if (DCCP_SKB_CB(skb)->dccpd_opt_len + tot_len > DCCP_MAX_OPT_LEN) {
+2 -2
net/ipv4/tcp_timer.c
··· 171 171 { 172 172 struct inet_connection_sock *icsk = inet_csk(sk); 173 173 int retry_until; 174 - bool do_reset, syn_set = 0; 174 + bool do_reset, syn_set = false; 175 175 176 176 if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) { 177 177 if (icsk->icsk_retransmits) 178 178 dst_negative_advice(sk); 179 179 retry_until = icsk->icsk_syn_retries ? : sysctl_tcp_syn_retries; 180 - syn_set = 1; 180 + syn_set = true; 181 181 } else { 182 182 if (retransmits_timed_out(sk, sysctl_tcp_retries1, 0, 0)) { 183 183 /* Black hole detection */
+2 -2
net/mac80211/rc80211_pid_algo.c
··· 318 318 rinfo[i].diff = i * pinfo->norm_offset; 319 319 } 320 320 for (i = 1; i < sband->n_bitrates; i++) { 321 - s = 0; 321 + s = false; 322 322 for (j = 0; j < sband->n_bitrates - i; j++) 323 323 if (unlikely(sband->bitrates[rinfo[j].index].bitrate > 324 324 sband->bitrates[rinfo[j + 1].index].bitrate)) { ··· 327 327 rinfo[j + 1].index = tmp; 328 328 rinfo[rinfo[j].index].rev_index = j; 329 329 rinfo[rinfo[j + 1].index].rev_index = j + 1; 330 - s = 1; 330 + s = true; 331 331 } 332 332 if (!s) 333 333 break;
+1 -1
net/mac80211/scan.c
··· 106 106 /* save the ERP value so that it is available at association time */ 107 107 if (elems->erp_info && elems->erp_info_len >= 1) { 108 108 bss->erp_value = elems->erp_info[0]; 109 - bss->has_erp_value = 1; 109 + bss->has_erp_value = true; 110 110 } 111 111 112 112 if (elems->tim) {
+2 -2
net/netfilter/ipvs/ip_vs_pe_sip.c
··· 108 108 struct ip_vs_conn *ct) 109 109 110 110 { 111 - bool ret = 0; 111 + bool ret = false; 112 112 113 113 if (ct->af == p->af && 114 114 ip_vs_addr_equal(p->af, p->caddr, &ct->caddr) && ··· 121 121 ct->protocol == p->protocol && 122 122 ct->pe_data && ct->pe_data_len == p->pe_data_len && 123 123 !memcmp(ct->pe_data, p->pe_data, p->pe_data_len)) 124 - ret = 1; 124 + ret = true; 125 125 126 126 IP_VS_DBG_BUF(9, "SIP template match %s %s->%s:%d %s\n", 127 127 ip_vs_proto_name(p->protocol),
+3 -3
net/rfkill/rfkill-regulator.c
··· 36 36 if (blocked) { 37 37 if (rfkill_data->reg_enabled) { 38 38 regulator_disable(rfkill_data->vcc); 39 - rfkill_data->reg_enabled = 0; 39 + rfkill_data->reg_enabled = false; 40 40 } 41 41 } else { 42 42 if (!rfkill_data->reg_enabled) { 43 43 regulator_enable(rfkill_data->vcc); 44 - rfkill_data->reg_enabled = 1; 44 + rfkill_data->reg_enabled = true; 45 45 } 46 46 } 47 47 ··· 96 96 97 97 if (regulator_is_enabled(vcc)) { 98 98 dev_dbg(&pdev->dev, "Regulator already enabled\n"); 99 - rfkill_data->reg_enabled = 1; 99 + rfkill_data->reg_enabled = true; 100 100 } 101 101 rfkill_data->vcc = vcc; 102 102 rfkill_data->rf_kill = rf_kill;
+7 -7
net/rxrpc/ar-ack.c
··· 195 195 sp = rxrpc_skb(txb); 196 196 197 197 if (sp->need_resend) { 198 - sp->need_resend = 0; 198 + sp->need_resend = false; 199 199 200 200 /* each Tx packet has a new serial number */ 201 201 sp->hdr.serial = ··· 216 216 } 217 217 218 218 if (time_after_eq(jiffies + 1, sp->resend_at)) { 219 - sp->need_resend = 1; 219 + sp->need_resend = true; 220 220 resend |= 1; 221 221 } else if (resend & 2) { 222 222 if (time_before(sp->resend_at, resend_at)) ··· 265 265 if (sp->need_resend) { 266 266 ; 267 267 } else if (time_after_eq(jiffies + 1, sp->resend_at)) { 268 - sp->need_resend = 1; 268 + sp->need_resend = true; 269 269 resend |= 1; 270 270 } else if (resend & 2) { 271 271 if (time_before(sp->resend_at, resend_at)) ··· 314 314 315 315 switch (sacks[loop]) { 316 316 case RXRPC_ACK_TYPE_ACK: 317 - sp->need_resend = 0; 317 + sp->need_resend = false; 318 318 *p_txb |= 1; 319 319 break; 320 320 case RXRPC_ACK_TYPE_NACK: 321 - sp->need_resend = 1; 321 + sp->need_resend = true; 322 322 *p_txb &= ~1; 323 323 resend = 1; 324 324 break; ··· 344 344 345 345 if (*p_txb & 1) { 346 346 /* packet must have been discarded */ 347 - sp->need_resend = 1; 347 + sp->need_resend = true; 348 348 *p_txb &= ~1; 349 349 resend |= 1; 350 350 } else if (sp->need_resend) { 351 351 ; 352 352 } else if (time_after_eq(jiffies + 1, sp->resend_at)) { 353 - sp->need_resend = 1; 353 + sp->need_resend = true; 354 354 resend |= 1; 355 355 } else if (resend & 2) { 356 356 if (time_before(sp->resend_at, resend_at))
+2 -2
net/rxrpc/ar-output.c
··· 486 486 _proto("Tx DATA %%%u { #%u }", 487 487 ntohl(sp->hdr.serial), ntohl(sp->hdr.seq)); 488 488 489 - sp->need_resend = 0; 489 + sp->need_resend = false; 490 490 sp->resend_at = jiffies + rxrpc_resend_timeout * HZ; 491 491 if (!test_and_set_bit(RXRPC_CALL_RUN_RTIMER, &call->flags)) { 492 492 _debug("run timer"); ··· 508 508 509 509 if (ret < 0) { 510 510 _debug("need instant resend %d", ret); 511 - sp->need_resend = 1; 511 + sp->need_resend = true; 512 512 rxrpc_instant_resend(call); 513 513 } 514 514