]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
lib: bitmap: add alignment offset for bitmap_find_next_zero_area()
authorMichal Nazarewicz <mina86@mina86.com>
Sat, 13 Dec 2014 00:54:45 +0000 (16:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Sep 2017 05:05:45 +0000 (07:05 +0200)
commitfa69da4573fe24e83c3a773069aae5651f6747c6
tree398377a8684f4b8aa5d56bdb20ff9b23a3c2cee3
parent9988d693927f6eaab2d4b763798839cca41a0ec8
lib: bitmap: add alignment offset for bitmap_find_next_zero_area()

commit 5e19b013f55a884c59a14391b22138899d1cc4cc upstream.

Add a bitmap_find_next_zero_area_off() function which works like
bitmap_find_next_zero_area() function except it allows an offset to be
specified when alignment is checked.  This lets caller request a bit such
that its number plus the offset is aligned according to the mask.

[gregory.0xf0@gmail.com: Retrieved from https://patchwork.linuxtv.org/patch/6254/ and updated documentation]
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/bitmap.h
lib/bitmap.c