Skip to content

Commit

Permalink
remove BITS_TO_TYPE macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Oct 19, 2007
1 parent 1cafc30 commit 14ed9d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/linux/bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions include/linux/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 14ed9d2

Please sign in to comment.