From: Jiri Slaby Date: Fri, 19 Oct 2007 06:40:37 +0000 (-0700) Subject: remove BITS_TO_TYPE macro X-Git-Tag: v2.6.24-rc1~184 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=14ed9d23aa9acd79210a92ac561a728b42a8e281;p=linux-2.6-omap-h63xx.git remove BITS_TO_TYPE macro 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 64b4641904f..acad1105d94 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -6,6 +6,7 @@ #include #include #include +#include /* * bitmaps provide bit arrays that consume one or more unsigned diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 7fc90d7cd0c..69c1edb9fe5 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -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