]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 1 Aug 2018 22:42:56 +0000 (15:42 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 6 Mar 2020 07:13:20 +0000 (02:13 -0500)
commitb2917089a9a6a92410337744e34199debd4d5f5d
treeca45e1af245f4f22a8ed6411d7bba47421c328ff
parentb6994a110ee77ada7df01412fa49d086a9a52866
bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()

BugLink: https://bugs.launchpad.net/bugs/1864261
commit c42b65e363ce97a828f81b59033c3558f8fa7f70 upstream.

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.

Note, due to multiple circular dependencies we may not provide
the helpers as inliners. For now we keep them exported and, perhaps,
at some point in the future we will sort out header inclusion and
inheritance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
include/linux/bitmap.h
lib/bitmap.c