Re: [dm-devel] [PATCH v3 0/5] bitmap: Introduce alloc/free helpers

2018-06-20 Thread Andy Shevchenko
On Wed, 2018-06-20 at 10:33 +0300, Yury Norov wrote: > On Mon, Jun 18, 2018 at 04:09:58PM +0300, Andy Shevchenko wrote: > > External Email > > > > A lot of code is using allocation of bitmaps using BITS_PER_LONG() > > macro and > > sizeof(unsigned long) operator. The readability suffers because

Re: [dm-devel] [PATCH v3 0/5] bitmap: Introduce alloc/free helpers

2018-06-20 Thread Yury Norov
On Mon, Jun 18, 2018 at 04:09:58PM +0300, Andy Shevchenko wrote: > External Email > > A lot of code is using allocation of bitmaps using BITS_PER_LONG() macro and > sizeof(unsigned long) operator. The readability suffers because of this. > > The series introduces three helpers, i.e.

[dm-devel] [PATCH v3 0/5] bitmap: Introduce alloc/free helpers

2018-06-19 Thread Andy Shevchenko
A lot of code is using allocation of bitmaps using BITS_PER_LONG() macro and sizeof(unsigned long) operator. The readability suffers because of this. The series introduces three helpers, i.e. bitmap_alloc(), bitmap_zalloc() and bitmap_free(), to make it more cleaner. Patch 1 is a preparatory to