Commit 9c03b49c authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] FRV: Make the bit finding functions take const pointers

This makes the bit finding functions in asm/bitops.h take const pointers
since they don't modify what they access. 
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8f87367d
...@@ -178,9 +178,9 @@ extern int find_next_bit(const unsigned long *addr, int size, int offset); ...@@ -178,9 +178,9 @@ extern int find_next_bit(const unsigned long *addr, int size, int offset);
#define find_first_zero_bit(addr, size) \ #define find_first_zero_bit(addr, size) \
find_next_zero_bit((addr), (size), 0) find_next_zero_bit((addr), (size), 0)
static inline int find_next_zero_bit (void * addr, int size, int offset) static inline int find_next_zero_bit(const void *addr, int size, int offset)
{ {
unsigned long *p = ((unsigned long *) addr) + (offset >> 5); const unsigned long *p = ((const unsigned long *) addr) + (offset >> 5);
unsigned long result = offset & ~31UL; unsigned long result = offset & ~31UL;
unsigned long tmp; unsigned long tmp;
...@@ -277,11 +277,11 @@ static inline int ext2_test_bit(int nr, const volatile void * addr) ...@@ -277,11 +277,11 @@ static inline int ext2_test_bit(int nr, const volatile void * addr)
#define ext2_find_first_zero_bit(addr, size) \ #define ext2_find_first_zero_bit(addr, size) \
ext2_find_next_zero_bit((addr), (size), 0) ext2_find_next_zero_bit((addr), (size), 0)
static inline unsigned long ext2_find_next_zero_bit(void *addr, static inline unsigned long ext2_find_next_zero_bit(const void *addr,
unsigned long size, unsigned long size,
unsigned long offset) unsigned long offset)
{ {
unsigned long *p = ((unsigned long *) addr) + (offset >> 5); const unsigned long *p = ((const unsigned long *) addr) + (offset >> 5);
unsigned long result = offset & ~31UL; unsigned long result = offset & ~31UL;
unsigned long tmp; unsigned long tmp;
......
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