public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] FRV: Make the bit finding functions take const pointers
@ 2005-02-04 17:31 David Howells
  0 siblings, 0 replies; only message in thread
From: David Howells @ 2005-02-04 17:31 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel


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@redhat.com>
---
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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-04 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04 17:31 [PATCH] FRV: Make the bit finding functions take const pointers David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox