Re: [PATCH v1 1/3] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

2018-06-04 Thread Dmitry Torokhov
On Mon, Jun 04, 2018 at 02:57:23PM -0700, Dmitry Torokhov wrote: > On Mon, Jun 04, 2018 at 12:59:54PM +0300, Andy Shevchenko wrote: > > On Fri, 2018-06-01 at 11:33 -0700, Dmitry Torokhov wrote: > > > Hi Andy, > > > > > > On Fri, Jun 01, 2018 at 11:31:18AM +0300, Andy Shevchenko wrote: > > > > A lo

Re: [PATCH v1 1/3] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

2018-06-04 Thread Dmitry Torokhov
On Mon, Jun 04, 2018 at 12:59:54PM +0300, Andy Shevchenko wrote: > On Fri, 2018-06-01 at 11:33 -0700, Dmitry Torokhov wrote: > > Hi Andy, > > > > On Fri, Jun 01, 2018 at 11:31:18AM +0300, Andy Shevchenko wrote: > > > A lot of code become ugly because of open coding allocations for > > > bitmaps. >

Re: [PATCH v1 1/3] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

2018-06-04 Thread Andy Shevchenko
On Fri, 2018-06-01 at 11:33 -0700, Dmitry Torokhov wrote: > Hi Andy, > > On Fri, Jun 01, 2018 at 11:31:18AM +0300, Andy Shevchenko wrote: > > A lot of code become ugly because of open coding allocations for > > bitmaps. > > > > Introduce three helpers to allow users be more clear of intention > >

Re: [PATCH v1 1/3] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

2018-06-01 Thread Dmitry Torokhov
Hi Andy, On Fri, Jun 01, 2018 at 11:31:18AM +0300, Andy Shevchenko wrote: > A lot of code become ugly because of open coding allocations for bitmaps. > > Introduce three helpers to allow users be more clear of intention > and keep their code neat. > > Signed-off-by: Andy Shevchenko This looks

[PATCH v1 1/3] bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

2018-06-01 Thread Andy Shevchenko
A lot of code become ugly because of open coding allocations for bitmaps. Introduce three helpers to allow users be more clear of intention and keep their code neat. Signed-off-by: Andy Shevchenko --- include/linux/bitmap.h | 16 1 file changed, 16 insertions(+) diff --git a/i