summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2016-03-05 13:47:08 +0000
committerMichael Tokarev <mjt@tls.msk.ru>2016-10-08 11:25:29 +0300
commitcb57fb37051b11d04f1ddce736b0ec3f936e978e (patch)
tree83b9551dfd911cc2d13a1e5a6f4526be06c79727 /util
parent88071589e8c6665c40c39bdefc59ad615693b325 (diff)
downloadqemu-cb57fb37051b11d04f1ddce736b0ec3f936e978e.tar.gz
bitmap: refine and move BITMAP_{FIRST/LAST}_WORD_MASK
According to linux kernel commit <89c1e79eb30> ("linux/bitmap.h: improve BITMAP_{LAST,FIRST}_WORD_MASK"), these two macro could be improved. This patch takes this change and also move them all in header file. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'util')
-rw-r--r--util/bitmap.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/util/bitmap.c b/util/bitmap.c
index 40aadfb4f3..43ed011720 100644
--- a/util/bitmap.c
+++ b/util/bitmap.c
@@ -157,8 +157,6 @@ int slow_bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1,
return result != 0;
}
-#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) % BITS_PER_LONG))
-
void bitmap_set(unsigned long *map, long start, long nr)
{
unsigned long *p = map + BIT_WORD(start);