Re: [PATCH 2/3] lib: Introduce 2 find bit api: all_is_bit_{one,zero}

2015-11-20 Thread Michal Nazarewicz
On Thu, Nov 19 2015, Jia He wrote: > This patch introduces 2 lightweight bit api. > all_bit_is_zero return 1 if the bit string is all zero. > The addr is the start address, the size is the bit size of the bit string. > all_bit_is_one is the opposite. > > Signed-off-by: Jia He > --- >

Re: [PATCH 2/3] lib: Introduce 2 find bit api: all_is_bit_{one,zero}

2015-11-20 Thread Geert Uytterhoeven
On Thu, Nov 19, 2015 at 3:31 AM, Jia He wrote: > --- a/lib/find_bit.c > +++ b/lib/find_bit.c > @@ -131,6 +131,56 @@ unsigned long find_last_bit(const unsigned long *addr, > unsigned long size) > EXPORT_SYMBOL(find_last_bit); > #endif > > +#ifndef all_bit_is_zero > +/* > + * return val: 1 means

Re: [PATCH 2/3] lib: Introduce 2 find bit api: all_is_bit_{one,zero}

2015-11-20 Thread Michal Nazarewicz
On Thu, Nov 19 2015, Jia He wrote: > This patch introduces 2 lightweight bit api. > all_bit_is_zero return 1 if the bit string is all zero. > The addr is the start address, the size is the bit size of the bit string. > all_bit_is_one is the opposite. > > Signed-off-by: Jia He

Re: [PATCH 2/3] lib: Introduce 2 find bit api: all_is_bit_{one,zero}

2015-11-20 Thread Geert Uytterhoeven
On Thu, Nov 19, 2015 at 3:31 AM, Jia He wrote: > --- a/lib/find_bit.c > +++ b/lib/find_bit.c > @@ -131,6 +131,56 @@ unsigned long find_last_bit(const unsigned long *addr, > unsigned long size) > EXPORT_SYMBOL(find_last_bit); > #endif > > +#ifndef all_bit_is_zero > +/* > + *

[PATCH 2/3] lib: Introduce 2 find bit api: all_is_bit_{one,zero}

2015-11-18 Thread Jia He
This patch introduces 2 lightweight bit api. all_bit_is_zero return 1 if the bit string is all zero. The addr is the start address, the size is the bit size of the bit string. all_bit_is_one is the opposite. Signed-off-by: Jia He --- lib/find_bit.c | 50

[PATCH 2/3] lib: Introduce 2 find bit api: all_is_bit_{one,zero}

2015-11-18 Thread Jia He
This patch introduces 2 lightweight bit api. all_bit_is_zero return 1 if the bit string is all zero. The addr is the start address, the size is the bit size of the bit string. all_bit_is_one is the opposite. Signed-off-by: Jia He --- lib/find_bit.c | 50