remove BITS_TO_TYPE macro
authorJiri Slaby <jirislaby@gmail.com>
Fri, 19 Oct 2007 06:40:37 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:42 +0000 (11:53 -0700)
remove BITS_TO_TYPE macro

I realized, that it is actually the same as DIV_ROUND_UP, use it instead.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/bitmap.h
include/linux/bitops.h

index 64b4641904fee0415c169d3f20e3bd4cdba71f5c..acad1105d94287af0cba3322e3368efe1b4f38fb 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/types.h>
 #include <linux/bitops.h>
 #include <linux/string.h>
+#include <linux/kernel.h>
 
 /*
  * bitmaps provide bit arrays that consume one or more unsigned
index 7fc90d7cd0c90892050d5734710d676e5b9c18f7..69c1edb9fe54a345f061cf983fe8311805c83154 100644 (file)
@@ -6,8 +6,7 @@
 #define BIT(nr)                        (1UL << (nr))
 #define BIT_MASK(nr)           (1UL << ((nr) % BITS_PER_LONG))
 #define BIT_WORD(nr)           ((nr) / BITS_PER_LONG)
-#define BITS_TO_TYPE(nr, t)    (((nr)+(t)-1)/(t))
-#define BITS_TO_LONGS(nr)      BITS_TO_TYPE(nr, BITS_PER_LONG)
+#define BITS_TO_LONGS(nr)      DIV_ROUND_UP(nr, BITS_PER_LONG)
 #define BITS_PER_BYTE          8
 #endif