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

2020-06-03 Thread Andy Shevchenko
On Thu, Jun 4, 2020 at 12:58 AM Andy Shevchenko wrote: > > On Thu, Jun 4, 2020 at 12:53 AM Rikard Falkeborn > wrote: > > On Wed, Jun 03, 2020 at 11:49:37AM +0300, Andy Shevchenko wrote: > > > On Tue, Jun 2, 2020 at 10:01 PM Rikard Falkeborn > > > wrote: > > ... > > > I'd be very surprised if

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

2020-06-03 Thread Andy Shevchenko
On Thu, Jun 4, 2020 at 12:53 AM Rikard Falkeborn wrote: > On Wed, Jun 03, 2020 at 11:49:37AM +0300, Andy Shevchenko wrote: > > On Tue, Jun 2, 2020 at 10:01 PM Rikard Falkeborn > > wrote: ... > I'd be very surprised if compilers warned for explicit casts but I'll > send a proper patch soon to

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

2020-06-03 Thread Rikard Falkeborn
On Wed, Jun 03, 2020 at 11:49:37AM +0300, Andy Shevchenko wrote: > On Tue, Jun 2, 2020 at 10:01 PM Rikard Falkeborn > wrote: > > On Mon, Jun 01, 2020 at 11:33:30AM +0300, Andy Shevchenko wrote: > > > On Mon, Jun 01, 2020 at 12:37:16AM +0200, Rikard Falkeborn wrote: > > > > On Sun, May 31, 2020 at

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

2020-06-03 Thread Andy Shevchenko
On Tue, Jun 2, 2020 at 10:01 PM Rikard Falkeborn wrote: > On Mon, Jun 01, 2020 at 11:33:30AM +0300, Andy Shevchenko wrote: > > On Mon, Jun 01, 2020 at 12:37:16AM +0200, Rikard Falkeborn wrote: > > > On Sun, May 31, 2020 at 02:00:45PM +0300, Andy Shevchenko wrote: ... > > > If we cast to int, we

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

2020-06-02 Thread Rikard Falkeborn
On Mon, Jun 01, 2020 at 11:33:30AM +0300, Andy Shevchenko wrote: > On Mon, Jun 01, 2020 at 12:37:16AM +0200, Rikard Falkeborn wrote: > > + Emil who was working on a patch for this > > > > On Sun, May 31, 2020 at 02:00:45PM +0300, Andy Shevchenko wrote: > > > On Sun, May 31, 2020 at 4:11 AM Syed

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

2020-06-01 Thread Andy Shevchenko
On Mon, Jun 01, 2020 at 12:37:16AM +0200, Rikard Falkeborn wrote: > + Emil who was working on a patch for this > > On Sun, May 31, 2020 at 02:00:45PM +0300, Andy Shevchenko wrote: > > On Sun, May 31, 2020 at 4:11 AM Syed Nayyar Waris > > wrote: > > > On Sat, May 30, 2020 at 2:50 PM Andy

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

2020-05-31 Thread Syed Nayyar Waris
On Mon, Jun 1, 2020 at 4:07 AM Rikard Falkeborn wrote: > > + Emil who was working on a patch for this > > On Sun, May 31, 2020 at 02:00:45PM +0300, Andy Shevchenko wrote: > > On Sun, May 31, 2020 at 4:11 AM Syed Nayyar Waris > > wrote: > > > On Sat, May 30, 2020 at 2:50 PM Andy Shevchenko > > >

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

2020-05-31 Thread Rikard Falkeborn
+ Emil who was working on a patch for this On Sun, May 31, 2020 at 02:00:45PM +0300, Andy Shevchenko wrote: > On Sun, May 31, 2020 at 4:11 AM Syed Nayyar Waris > wrote: > > On Sat, May 30, 2020 at 2:50 PM Andy Shevchenko > > wrote: > > > On Sat, May 30, 2020 at 11:45 AM Syed Nayyar Waris > >

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

2020-05-31 Thread Andy Shevchenko
On Sun, May 31, 2020 at 4:11 AM Syed Nayyar Waris wrote: > On Sat, May 30, 2020 at 2:50 PM Andy Shevchenko > wrote: > > On Sat, May 30, 2020 at 11:45 AM Syed Nayyar Waris > > wrote: > > > On Sat, May 30, 2020 at 3:49 AM Andy Shevchenko > > > wrote: ... > #if (l) == 0 > #define

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

2020-05-30 Thread Syed Nayyar Waris
On Sat, May 30, 2020 at 2:50 PM Andy Shevchenko wrote: > > On Sat, May 30, 2020 at 11:45 AM Syed Nayyar Waris > wrote: > > On Sat, May 30, 2020 at 3:49 AM Andy Shevchenko > > wrote: > > ... > > > I am still investigating more on this. Let me know if you have any > > suggestions. > > As far as

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

2020-05-30 Thread Andy Shevchenko
On Sat, May 30, 2020 at 11:45 AM Syed Nayyar Waris wrote: > On Sat, May 30, 2020 at 3:49 AM Andy Shevchenko > wrote: ... > I am still investigating more on this. Let me know if you have any > suggestions. As far as I understand the start pointers are implementations of abs() macro followed

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

2020-05-30 Thread Syed Nayyar Waris
On Sat, May 30, 2020 at 3:49 AM Andy Shevchenko wrote: > > On Sat, May 30, 2020 at 1:11 AM Syed Nayyar Waris > wrote: > > On Sat, May 30, 2020 at 3:13 AM Andy Shevchenko > > wrote: > > > On Fri, May 29, 2020 at 11:07 PM Syed Nayyar Waris > > > wrote: > > > > On Sat, May 30, 2020 at 12:08 AM

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

2020-05-29 Thread Andy Shevchenko
On Sat, May 30, 2020 at 1:11 AM Syed Nayyar Waris wrote: > On Sat, May 30, 2020 at 3:13 AM Andy Shevchenko > wrote: > > On Fri, May 29, 2020 at 11:07 PM Syed Nayyar Waris > > wrote: > > > On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko > > > wrote: > > > > On Fri, May 29, 2020 at 11:38:18PM

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

2020-05-29 Thread Syed Nayyar Waris
On Sat, May 30, 2020 at 3:13 AM Andy Shevchenko wrote: > > On Fri, May 29, 2020 at 11:07 PM Syed Nayyar Waris > wrote: > > On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko > > wrote: > > > On Fri, May 29, 2020 at 11:38:18PM +0530, Syed Nayyar Waris wrote: > > > > On Sun, May 24, 2020 at 8:15

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

2020-05-29 Thread Andy Shevchenko
On Sat, May 30, 2020 at 12:42 AM Andy Shevchenko wrote: > On Fri, May 29, 2020 at 11:07 PM Syed Nayyar Waris > wrote: > > On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko > > wrote: ... > > Explanation: > > Actually when nbits (clump size) is 64 (BITS_PER_LONG is 64 on my computer), > >

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

2020-05-29 Thread Syed Nayyar Waris
On Sat, May 30, 2020 at 3:01 AM William Breathitt Gray wrote: > > On Sat, May 30, 2020 at 01:32:44AM +0530, Syed Nayyar Waris wrote: > > On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko > > wrote: > > > > > > On Fri, May 29, 2020 at 11:38:18PM +0530, Syed Nayyar Waris wrote: > > > > On Sun, May

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

2020-05-29 Thread Andy Shevchenko
On Fri, May 29, 2020 at 11:07 PM Syed Nayyar Waris wrote: > On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko > wrote: > > On Fri, May 29, 2020 at 11:38:18PM +0530, Syed Nayyar Waris wrote: > > > On Sun, May 24, 2020 at 8:15 PM kbuild test robot wrote: ... > > > Taking the example statement

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

2020-05-29 Thread William Breathitt Gray
On Sat, May 30, 2020 at 01:32:44AM +0530, Syed Nayyar Waris wrote: > On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko > wrote: > > > > On Fri, May 29, 2020 at 11:38:18PM +0530, Syed Nayyar Waris wrote: > > > On Sun, May 24, 2020 at 8:15 PM kbuild test robot wrote: > > > > ... > > > > > >579

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

2020-05-29 Thread Syed Nayyar Waris
On Sat, May 30, 2020 at 12:08 AM Andy Shevchenko wrote: > > On Fri, May 29, 2020 at 11:38:18PM +0530, Syed Nayyar Waris wrote: > > On Sun, May 24, 2020 at 8:15 PM kbuild test robot wrote: > > ... > > > >579 static inline unsigned long bitmap_get_value(const unsigned long > > > *map, > > >

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

2020-05-29 Thread Andy Shevchenko
On Fri, May 29, 2020 at 11:38:18PM +0530, Syed Nayyar Waris wrote: > On Sun, May 24, 2020 at 8:15 PM kbuild test robot wrote: ... > >579 static inline unsigned long bitmap_get_value(const unsigned long > > *map, > >580unsigned long

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

2020-05-29 Thread Syed Nayyar Waris
On Sun, May 24, 2020 at 8:15 PM kbuild test robot wrote: > > Hi Syed, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce] > > url: >

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

2020-05-24 Thread kbuild test robot
Hi Syed, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce] url: https://github.com/0day-ci/linux/commits/Syed-Nayyar-Waris/Introduce-the-for_each_set_clump-macro/20200524-130931 base:

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

2020-05-23 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