Re: [PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-16 Thread Syed Nayyar Waris
On Fri, Oct 16, 2020 at 2:46 PM Andy Shevchenko wrote: > > On Fri, Oct 16, 2020 at 04:23:05AM +0530, Syed Nayyar Waris wrote: > > On Tue, Oct 6, 2020 at 4:56 PM Andy Shevchenko > > wrote: > > > On Tue, Oct 06, 2020 at 02:52:16PM +0530, Syed Nayyar Waris wrote: > > ... > > > > > +

Re: [PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-16 Thread Andy Shevchenko
On Fri, Oct 16, 2020 at 04:23:05AM +0530, Syed Nayyar Waris wrote: > On Tue, Oct 6, 2020 at 4:56 PM Andy Shevchenko > wrote: > > On Tue, Oct 06, 2020 at 02:52:16PM +0530, Syed Nayyar Waris wrote: ... > > > + return (map[index] >> offset) & GENMASK(nbits - 1, 0); > > > > Have you

Re: [PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-15 Thread Syed Nayyar Waris
On Tue, Oct 6, 2020 at 4:56 PM Andy Shevchenko wrote: > > On Tue, Oct 06, 2020 at 02:52:16PM +0530, Syed Nayyar Waris wrote: > > This macro iterates for each group of bits (clump) with set bits, > > within a bitmap memory region. For each iteration, "start" is set to > > the bit offset of the

Re: [PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-06 Thread Andy Shevchenko
On Tue, Oct 06, 2020 at 02:52:16PM +0530, Syed Nayyar Waris wrote: > This macro iterates for each group of bits (clump) with set bits, > within a bitmap memory region. For each iteration, "start" is set to > the bit offset of the found clump, while the respective clump value is > stored to the

[PATCH v11 1/4] bitops: Introduce the for_each_set_clump macro

2020-10-06 Thread Syed Nayyar Waris
This macro iterates for each group of bits (clump) with set bits, within a bitmap memory region. For each iteration, "start" is set to the bit offset of the found clump, while the respective clump value is stored to the location pointed by "clump". Additionally, the bitmap_get_value() and