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

From: David Howells
Date: Fri Feb 04 2005 - 14:01:37 EST



The attached patch makes the bit finding functions in asm/bitops.h take const
pointers since they don't modify what they access.

Signed-Off-By: David Howells <dhowells@xxxxxxxxxx>
---
warthog>diffstat -p1 frv-findbit-const-2611rc3.diff
include/asm-frv/bitops.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff -uNrp /warthog/kernels/linux-2.6.11-rc3/include/asm-frv/bitops.h linux-2.6.11-rc3-frv/include/asm-frv/bitops.h
--- /warthog/kernels/linux-2.6.11-rc3/include/asm-frv/bitops.h 2005-02-04 11:50:21.000000000 +0000
+++ linux-2.6.11-rc3-frv/include/asm-frv/bitops.h 2005-02-04 14:24:36.000000000 +0000
@@ -178,9 +178,9 @@ extern int find_next_bit(const unsigned
#define find_first_zero_bit(addr, size) \
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 tmp;

@@ -277,11 +277,11 @@ static inline int ext2_test_bit(int nr,
#define ext2_find_first_zero_bit(addr, size) \
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 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 tmp;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/