linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 305] M68k bitops
@ 2003-09-28 12:55 Geert Uytterhoeven
  0 siblings, 0 replies; only message in thread
From: Geert Uytterhoeven @ 2003-09-28 12:55 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: Linux Kernel Development, Geert Uytterhoeven

M68k bitops: Make input parameters of *find*bit() routines const:
  - find_first_zero_bit()
  - find_next_zero_bit()
  - sched_find_first_bit()

--- linux-2.6.0-test6/include/asm-m68k/bitops.h	Sun Apr 20 12:28:58 2003
+++ linux-m68k-2.6.0-test6/include/asm-m68k/bitops.h	Wed Sep 10 21:27:51 2003
@@ -164,9 +164,10 @@
 	return ((1UL << (nr & 31)) & (((const volatile unsigned long *) vaddr)[nr >> 5])) != 0;
 }
 
-extern __inline__ int find_first_zero_bit(unsigned long * vaddr, unsigned size)
+extern __inline__ int find_first_zero_bit(const unsigned long *vaddr,
+					  unsigned size)
 {
-	unsigned long *p = vaddr, *addr = vaddr;
+	const unsigned long *p = vaddr, *addr = vaddr;
 	unsigned long allones = ~0UL;
 	int res;
 	unsigned long num;
@@ -187,11 +188,11 @@
 	return ((p - addr) << 5) + (res ^ 31);
 }
 
-extern __inline__ int find_next_zero_bit (unsigned long *vaddr, int size,
+extern __inline__ int find_next_zero_bit (const unsigned long *vaddr, int size,
 				      int offset)
 {
-	unsigned long *addr = vaddr;
-	unsigned long *p = addr + (offset >> 5);
+	const unsigned long *addr = vaddr;
+	const unsigned long *p = addr + (offset >> 5);
 	int set = 0, bit = offset & 31UL, res;
 
 	if (offset >= size)
@@ -263,7 +264,7 @@
  * unlikely to be set. It's guaranteed that at least one of the 140
  * bits is cleared.
  */
-static inline int sched_find_first_bit(unsigned long *b)
+static inline int sched_find_first_bit(const unsigned long *b)
 {
 	if (unlikely(b[0]))
 		return __ffs(b[0]);

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

only message in thread, other threads:[~2003-09-28 21:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-28 12:55 [PATCH 305] M68k bitops Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).