Commit 9c6325dc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] alpha: nodemask build fix

nodemask.h wants find_next_zero_bit() to take a const address.  Fix that up
and modify find_next_bit() to suit.

(These functions seem too big to be inlined...)

Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e23f27c4
...@@ -376,12 +376,13 @@ static inline unsigned long hweight64(unsigned long w) ...@@ -376,12 +376,13 @@ static inline unsigned long hweight64(unsigned long w)
* Find next zero bit in a bitmap reasonably efficiently.. * Find next zero bit in a bitmap reasonably efficiently..
*/ */
static inline unsigned long static inline unsigned long
find_next_zero_bit(void * addr, unsigned long size, unsigned long offset) find_next_zero_bit(const void *addr, unsigned long size, unsigned long offset)
{ {
unsigned long * p = ((unsigned long *) addr) + (offset >> 6); const unsigned long *p = addr;
unsigned long result = offset & ~63UL; unsigned long result = offset & ~63UL;
unsigned long tmp; unsigned long tmp;
p += offset >> 6;
if (offset >= size) if (offset >= size)
return size; return size;
size -= result; size -= result;
...@@ -419,10 +420,11 @@ find_next_zero_bit(void * addr, unsigned long size, unsigned long offset) ...@@ -419,10 +420,11 @@ find_next_zero_bit(void * addr, unsigned long size, unsigned long offset)
static inline unsigned long static inline unsigned long
find_next_bit(const void * addr, unsigned long size, unsigned long offset) find_next_bit(const void * addr, unsigned long size, unsigned long offset)
{ {
const unsigned long * p = ((const unsigned long *) addr) + (offset >> 6); const unsigned long *p = addr;
unsigned long result = offset & ~63UL; unsigned long result = offset & ~63UL;
unsigned long tmp; unsigned long tmp;
p += offset >> 6;
if (offset >= size) if (offset >= size)
return size; return size;
size -= result; size -= result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment