aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
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/gianfar.c
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/gianfar.c')
-rw-r--r--drivers/net/gianfar.c12
1 files changed, 6 insertions, 6 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];