lkml.org 
[lkml]   [2010]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2010-03-05 05:59    [W:0.053 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site