Messages in this thread | | | Date | Fri, 5 Mar 2010 15:57:22 +1100 | From | Stephen Rothwell <> | Subject | Re: [PATCH 1/9] bitops: rename for_each_bit to for_each_set_bit |
| |
Hi,
On Tue, 2 Feb 2010 00:10:32 +0900 Akinobu Mita <akinobu.mita@gmail.com> wrote: > > diff --git a/include/linux/bitops.h b/include/linux/bitops.h > index c05a29c..de68c58 100644 > --- a/include/linux/bitops.h > +++ b/include/linux/bitops.h > @@ -16,7 +16,7 @@ > */ > #include <asm/bitops.h> > > -#define for_each_bit(bit, addr, size) \ > +#define for_each_set_bit(bit, addr, size) \ > for ((bit) = find_first_bit((addr), (size)); \ > (bit) < (size); \ > (bit) = find_next_bit((addr), (size), (bit) + 1))
If you also added
#define for_each_bit(bit, addr, size) for_each_set_bit((bit), (addr), (size))
Then the transition can be made not as painful i.e. less likely to impact on new users of for_each_bit() that may not currently be in Linus' tree.
(and the patch to bitops.h could be submitted on its own, and the other parts could be sent to their respective maintainer - which also lowers the pain for them with conflicts etc).
-- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [unhandled content-type:application/pgp-signature] | |