[Patch 4/23] mask v2 - two missing 'const' qualifiers

Paul Jackson
2004-04-01T21:41:38Z

Patch_4_of_23 - two missing 'const' qualifiers in bitops/bitmap
Add a couple of missing 'const' qualifiers on
bitops test_bit and bitmap_equal args.

Diffstat Patch_4_of_23:
include/asm-generic/bitops.h | 2 +-
lib/bitmap.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

===================================================================
--- 2.6.4.orig/include/asm-generic/bitops.h 2004-03-31 22:04:06.000000000 -0800
+++ 2.6.4/include/asm-generic/bitops.h 2004-03-31 22:07:17.000000000 -0800
@@ -42,7 +42,7 @@
return retval;
}

-extern __inline__ int test_bit(int nr, long * addr)
+extern __inline__ int test_bit(int nr, const unsigned long * addr)
{
int mask;

===================================================================
--- 2.6.4.orig/lib/bitmap.c 2004-03-31 22:07:07.000000000 -0800
+++ 2.6.4/lib/bitmap.c 2004-03-31 22:13:51.000000000 -0800
@@ -17,7 +17,7 @@
*
* The operations in this lib/bitmap.c, and the associated
* files include/linux/bitmap.h, include/linux/bitops.h,
- * and include/asm-*/bitops.h, and in the *_BITMAP macros in
+ * and include/asm-<arch>/bitops.h, and in the *_BITMAP macros in
* include/linux/types.h, support a model of a set of bits, in
* positions 0 .. nbits-1, for some nbits size between 1 and some
* modest size. There is no specific limit on the size, but the
@@ -92,7 +92,7 @@
EXPORT_SYMBOL(bitmap_full);

int bitmap_equal(const unsigned long *bitmap1,
- unsigned long *bitmap2, int bits)
+ const unsigned long *bitmap2, int bits)
{
int k, lim = bits/BITS_PER_LONG;;
for (k = 0; k < lim; ++k)