Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-04 Thread Andy Shevchenko
On Thu, Oct 04, 2018 at 07:36:20PM +0900, William Breathitt Gray wrote: > On Wed, Oct 03, 2018 at 02:48:04PM +0300, Andy Shevchenko wrote: > > On Tue, Oct 02, 2018 at 11:21:42AM +0300, Andy Shevchenko wrote: > > > > > I would rather go with two prototypes to get()/set() a clump in the bitmap > > >

Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-04 Thread William Breathitt Gray
On Wed, Oct 03, 2018 at 02:48:04PM +0300, Andy Shevchenko wrote: > On Tue, Oct 02, 2018 at 11:21:42AM +0300, Andy Shevchenko wrote: > > > I would rather go with two prototypes to get()/set() a clump in the bitmap > > in a way when it's aligned and BITS_PER_LONG % clump_size == 0. > > To make thin

Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-04 Thread William Breathitt Gray
On Tue, Oct 02, 2018 at 11:21:42AM +0300, Andy Shevchenko wrote: > On Tue, Oct 02, 2018 at 09:42:48AM +0200, Rasmus Villemoes wrote: > > On 2018-10-02 03:13, William Breathitt Gray wrote: > > > The cover letter says > > > > The clump_size argument can be an arbitrary number of bits and is not >

Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-04 Thread William Breathitt Gray
On Tue, Oct 02, 2018 at 09:42:48AM +0200, Rasmus Villemoes wrote: > On 2018-10-02 03:13, William Breathitt Gray wrote: > > This macro iterates for each group of bits (clump) with set bits, within > > a bitmap memory region. For each iteration, "clump" is set to the found > > clump index, "index" is

Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-03 Thread Andy Shevchenko
On Tue, Oct 02, 2018 at 11:21:42AM +0300, Andy Shevchenko wrote: > I would rather go with two prototypes to get()/set() a clump in the bitmap > in a way when it's aligned and BITS_PER_LONG % clump_size == 0. To make things much easier, restrict clump_size to the one from the following set: 1, 2,

Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-02 Thread Andy Shevchenko
On Tue, Oct 02, 2018 at 09:42:48AM +0200, Rasmus Villemoes wrote: > On 2018-10-02 03:13, William Breathitt Gray wrote: > The cover letter says > > The clump_size argument can be an arbitrary number of bits and is not > required to be a multiple of 2. > > by which I assume you mean "power of

Re: [RESEND PATCH v4 1/8] bitops: Introduce the for_each_set_clump macro

2018-10-02 Thread Rasmus Villemoes
On 2018-10-02 03:13, William Breathitt Gray wrote: > This macro iterates for each group of bits (clump) with set bits, within > a bitmap memory region. For each iteration, "clump" is set to the found > clump index, "index" is set to the word index of the bitmap containing > the found clump, and "of