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>
This commit is contained in:
committed by
Linus Torvalds
parent
e3cb91ce1a
commit
984b3f5746
@ -998,7 +998,7 @@ static int gfar_probe(struct of_device *ofdev,
|
||||
}
|
||||
|
||||
/* Need to reverse the bit maps as bit_map's MSB is q0
|
||||
* but, for_each_bit parses from right to left, which
|
||||
* but, for_each_set_bit parses from right to left, which
|
||||
* basically reverses the queue numbers */
|
||||
for (i = 0; i< priv->num_grps; i++) {
|
||||
priv->gfargrp[i].tx_bit_map = reverse_bitmap(
|
||||
@ -1011,7 +1011,7 @@ static int gfar_probe(struct of_device *ofdev,
|
||||
* also assign queues to groups */
|
||||
for (grp_idx = 0; grp_idx < priv->num_grps; grp_idx++) {
|
||||
priv->gfargrp[grp_idx].num_rx_queues = 0x0;
|
||||
for_each_bit(i, &priv->gfargrp[grp_idx].rx_bit_map,
|
||||
for_each_set_bit(i, &priv->gfargrp[grp_idx].rx_bit_map,
|
||||
priv->num_rx_queues) {
|
||||
priv->gfargrp[grp_idx].num_rx_queues++;
|
||||
priv->rx_queue[i]->grp = &priv->gfargrp[grp_idx];
|
||||
@ -1019,7 +1019,7 @@ static int gfar_probe(struct of_device *ofdev,
|
||||
rqueue = rqueue | ((RQUEUE_EN0 | RQUEUE_EX0) >> i);
|
||||
}
|
||||
priv->gfargrp[grp_idx].num_tx_queues = 0x0;
|
||||
for_each_bit (i, &priv->gfargrp[grp_idx].tx_bit_map,
|
||||
for_each_set_bit(i, &priv->gfargrp[grp_idx].tx_bit_map,
|
||||
priv->num_tx_queues) {
|
||||
priv->gfargrp[grp_idx].num_tx_queues++;
|
||||
priv->tx_queue[i]->grp = &priv->gfargrp[grp_idx];
|
||||
@ -1709,7 +1709,7 @@ void gfar_configure_coalescing(struct gfar_private *priv,
|
||||
|
||||
if (priv->mode == MQ_MG_MODE) {
|
||||
baddr = ®s->txic0;
|
||||
for_each_bit (i, &tx_mask, priv->num_tx_queues) {
|
||||
for_each_set_bit(i, &tx_mask, priv->num_tx_queues) {
|
||||
if (likely(priv->tx_queue[i]->txcoalescing)) {
|
||||
gfar_write(baddr + i, 0);
|
||||
gfar_write(baddr + i, priv->tx_queue[i]->txic);
|
||||
@ -1717,7 +1717,7 @@ void gfar_configure_coalescing(struct gfar_private *priv,
|
||||
}
|
||||
|
||||
baddr = ®s->rxic0;
|
||||
for_each_bit (i, &rx_mask, priv->num_rx_queues) {
|
||||
for_each_set_bit(i, &rx_mask, priv->num_rx_queues) {
|
||||
if (likely(priv->rx_queue[i]->rxcoalescing)) {
|
||||
gfar_write(baddr + i, 0);
|
||||
gfar_write(baddr + i, priv->rx_queue[i]->rxic);
|
||||
@ -2607,7 +2607,7 @@ static int gfar_poll(struct napi_struct *napi, int budget)
|
||||
budget_per_queue = left_over_budget/num_queues;
|
||||
left_over_budget = 0;
|
||||
|
||||
for_each_bit(i, &gfargrp->rx_bit_map, priv->num_rx_queues) {
|
||||
for_each_set_bit(i, &gfargrp->rx_bit_map, priv->num_rx_queues) {
|
||||
if (test_bit(i, &serviced_queues))
|
||||
continue;
|
||||
rx_queue = priv->rx_queue[i];
|
||||
|
Reference in New Issue
Block a user