aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2010-03-05 16:41:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:23 -0500
commit984b3f5746ed2cde3d184651dabf26980f2b66e5 (patch)
tree87dc2162b4778b0075874d9592384530022e15a4 /drivers/net
parente3cb91ce1ac1d93a7cc6f81bb5247f7602b572bb (diff)
bitops: rename for_each_bit() to for_each_set_bit()
Rename for_each_bit to for_each_set_bit in the kernel source tree. To permit for_each_clear_bit(), should that ever be added. The patch includes a macro to map the old for_each_bit() onto the new for_each_set_bit(). This is a (very) temporary thing to ease the migration. [akpm@linux-foundation.org: add temporary for_each_bit()] Suggested-by: Alexey Dobriyan <adobriyan@gmail.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Artem Bityutskiy <dedekind@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/gianfar.c12
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ixgbevf/ixgbevf_main.c2
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c2
-rw-r--r--drivers/net/wireless/iwmc3200wifi/debugfs.c2
-rw-r--r--drivers/net/wireless/iwmc3200wifi/rx.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 6aa526ee9096..61a7b4351e78 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -998,7 +998,7 @@ static int gfar_probe(struct of_device *ofdev,
998 } 998 }
999 999
1000 /* Need to reverse the bit maps as bit_map's MSB is q0 1000 /* Need to reverse the bit maps as bit_map's MSB is q0
1001 * but, for_each_bit parses from right to left, which 1001 * but, for_each_set_bit parses from right to left, which
1002 * basically reverses the queue numbers */ 1002 * basically reverses the queue numbers */
1003 for (i = 0; i< priv->num_grps; i++) { 1003 for (i = 0; i< priv->num_grps; i++) {
1004 priv->gfargrp[i].tx_bit_map = reverse_bitmap( 1004 priv->gfargrp[i].tx_bit_map = reverse_bitmap(
@@ -1011,7 +1011,7 @@ static int gfar_probe(struct of_device *ofdev,
1011 * also assign queues to groups */ 1011 * also assign queues to groups */
1012 for (grp_idx = 0; grp_idx < priv->num_grps; grp_idx++) { 1012 for (grp_idx = 0; grp_idx < priv->num_grps; grp_idx++) {
1013 priv->gfargrp[grp_idx].num_rx_queues = 0x0; 1013 priv->gfargrp[grp_idx].num_rx_queues = 0x0;
1014 for_each_bit(i, &priv->gfargrp[grp_idx].rx_bit_map, 1014 for_each_set_bit(i, &priv->gfargrp[grp_idx].rx_bit_map,
1015 priv->num_rx_queues) { 1015 priv->num_rx_queues) {
1016 priv->gfargrp[grp_idx].num_rx_queues++; 1016 priv->gfargrp[grp_idx].num_rx_queues++;
1017 priv->rx_queue[i]->grp = &priv->gfargrp[grp_idx]; 1017 priv->rx_queue[i]->grp = &priv->gfargrp[grp_idx];
@@ -1019,7 +1019,7 @@ static int gfar_probe(struct of_device *ofdev,
1019 rqueue = rqueue | ((RQUEUE_EN0 | RQUEUE_EX0) >> i); 1019 rqueue = rqueue | ((RQUEUE_EN0 | RQUEUE_EX0) >> i);
1020 } 1020 }
1021 priv->gfargrp[grp_idx].num_tx_queues = 0x0; 1021 priv->gfargrp[grp_idx].num_tx_queues = 0x0;
1022 for_each_bit (i, &priv->gfargrp[grp_idx].tx_bit_map, 1022 for_each_set_bit(i, &priv->gfargrp[grp_idx].tx_bit_map,
1023 priv->num_tx_queues) { 1023 priv->num_tx_queues) {
1024 priv->gfargrp[grp_idx].num_tx_queues++; 1024 priv->gfargrp[grp_idx].num_tx_queues++;
1025 priv->tx_queue[i]->grp = &priv->gfargrp[grp_idx]; 1025 priv->tx_queue[i]->grp = &priv->gfargrp[grp_idx];
@@ -1709,7 +1709,7 @@ void gfar_configure_coalescing(struct gfar_private *priv,
1709 1709
1710 if (priv->mode == MQ_MG_MODE) { 1710 if (priv->mode == MQ_MG_MODE) {
1711 baddr = &regs->txic0; 1711 baddr = &regs->txic0;
1712 for_each_bit (i, &tx_mask, priv->num_tx_queues) { 1712 for_each_set_bit(i, &tx_mask, priv->num_tx_queues) {
1713 if (likely(priv->tx_queue[i]->txcoalescing)) { 1713 if (likely(priv->tx_queue[i]->txcoalescing)) {
1714 gfar_write(baddr + i, 0); 1714 gfar_write(baddr + i, 0);
1715 gfar_write(baddr + i, priv->tx_queue[i]->txic); 1715 gfar_write(baddr + i, priv->tx_queue[i]->txic);
@@ -1717,7 +1717,7 @@ void gfar_configure_coalescing(struct gfar_private *priv,
1717 } 1717 }
1718 1718
1719 baddr = &regs->rxic0; 1719 baddr = &regs->rxic0;
1720 for_each_bit (i, &rx_mask, priv->num_rx_queues) { 1720 for_each_set_bit(i, &rx_mask, priv->num_rx_queues) {
1721 if (likely(priv->rx_queue[i]->rxcoalescing)) { 1721 if (likely(priv->rx_queue[i]->rxcoalescing)) {
1722 gfar_write(baddr + i, 0); 1722 gfar_write(baddr + i, 0);
1723 gfar_write(baddr + i, priv->rx_queue[i]->rxic); 1723 gfar_write(baddr + i, priv->rx_queue[i]->rxic);
@@ -2607,7 +2607,7 @@ static int gfar_poll(struct napi_struct *napi, int budget)
2607 budget_per_queue = left_over_budget/num_queues; 2607 budget_per_queue = left_over_budget/num_queues;
2608 left_over_budget = 0; 2608 left_over_budget = 0;
2609 2609
2610 for_each_bit(i, &gfargrp->rx_bit_map, priv->num_rx_queues) { 2610 for_each_set_bit(i, &gfargrp->rx_bit_map, priv->num_rx_queues) {
2611 if (test_bit(i, &serviced_queues)) 2611 if (test_bit(i, &serviced_queues))
2612 continue; 2612 continue;
2613 rx_queue = priv->rx_queue[i]; 2613 rx_queue = priv->rx_queue[i];
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 45e3532b166f..684af371462d 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1050,7 +1050,7 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
1050 */ 1050 */
1051 for (v_idx = 0; v_idx < q_vectors; v_idx++) { 1051 for (v_idx = 0; v_idx < q_vectors; v_idx++) {
1052 q_vector = adapter->q_vector[v_idx]; 1052 q_vector = adapter->q_vector[v_idx];
1053 /* XXX for_each_bit(...) */ 1053 /* XXX for_each_set_bit(...) */
1054 r_idx = find_first_bit(q_vector->rxr_idx, 1054 r_idx = find_first_bit(q_vector->rxr_idx,
1055 adapter->num_rx_queues); 1055 adapter->num_rx_queues);
1056 1056
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 235b5fd4b8d4..ca653c49b765 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -751,7 +751,7 @@ static void ixgbevf_configure_msix(struct ixgbevf_adapter *adapter)
751 */ 751 */
752 for (v_idx = 0; v_idx < q_vectors; v_idx++) { 752 for (v_idx = 0; v_idx < q_vectors; v_idx++) {
753 q_vector = adapter->q_vector[v_idx]; 753 q_vector = adapter->q_vector[v_idx];
754 /* XXX for_each_bit(...) */ 754 /* XXX for_each_set_bit(...) */
755 r_idx = find_first_bit(q_vector->rxr_idx, 755 r_idx = find_first_bit(q_vector->rxr_idx,
756 adapter->num_rx_queues); 756 adapter->num_rx_queues);
757 757
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 8a964f130367..a6452af9c6c5 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -394,7 +394,7 @@ static void ar9170_tx_fake_ampdu_status(struct ar9170 *ar)
394 ieee80211_tx_status_irqsafe(ar->hw, skb); 394 ieee80211_tx_status_irqsafe(ar->hw, skb);
395 } 395 }
396 396
397 for_each_bit(i, &queue_bitmap, BITS_PER_BYTE) { 397 for_each_set_bit(i, &queue_bitmap, BITS_PER_BYTE) {
398#ifdef AR9170_QUEUE_STOP_DEBUG 398#ifdef AR9170_QUEUE_STOP_DEBUG
399 printk(KERN_DEBUG "%s: wake queue %d\n", 399 printk(KERN_DEBUG "%s: wake queue %d\n",
400 wiphy_name(ar->hw->wiphy), i); 400 wiphy_name(ar->hw->wiphy), i);
diff --git a/drivers/net/wireless/iwmc3200wifi/debugfs.c b/drivers/net/wireless/iwmc3200wifi/debugfs.c
index be992ca41cf1..c29c994de0e2 100644
--- a/drivers/net/wireless/iwmc3200wifi/debugfs.c
+++ b/drivers/net/wireless/iwmc3200wifi/debugfs.c
@@ -89,7 +89,7 @@ static int iwm_debugfs_dbg_modules_write(void *data, u64 val)
89 for (i = 0; i < __IWM_DM_NR; i++) 89 for (i = 0; i < __IWM_DM_NR; i++)
90 iwm->dbg.dbg_module[i] = 0; 90 iwm->dbg.dbg_module[i] = 0;
91 91
92 for_each_bit(bit, &iwm->dbg.dbg_modules, __IWM_DM_NR) 92 for_each_set_bit(bit, &iwm->dbg.dbg_modules, __IWM_DM_NR)
93 iwm->dbg.dbg_module[bit] = iwm->dbg.dbg_level; 93 iwm->dbg.dbg_module[bit] = iwm->dbg.dbg_level;
94 94
95 return 0; 95 return 0;
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index ad8f7eabb5aa..8456b4dbd146 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -1116,7 +1116,7 @@ static int iwm_ntf_stop_resume_tx(struct iwm_priv *iwm, u8 *buf,
1116 return -EINVAL; 1116 return -EINVAL;
1117 } 1117 }
1118 1118
1119 for_each_bit(bit, (unsigned long *)&tid_msk, IWM_UMAC_TID_NR) { 1119 for_each_set_bit(bit, (unsigned long *)&tid_msk, IWM_UMAC_TID_NR) {
1120 tid_info = &sta_info->tid_info[bit]; 1120 tid_info = &sta_info->tid_info[bit];
1121 1121
1122 mutex_lock(&tid_info->mutex); 1122 mutex_lock(&tid_info->mutex);