summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-12 01:03:29 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-12 01:03:29 -0700
commit8447ac2688647d261af7a7397a53548a2a1afc13 (patch)
tree037865f6ae88dc9a22fd0418870a714593ff16c8 /include/linux
parent6ab26f0a7443f4d4e2b13c31717088ad410cb64b (diff)
[PATCH] Rename bitmap_clear to bitmap_zero, remove CLEAR_BITMAP
From: Rusty Russell <rusty@rustcorp.com.au> clear_bit(n, addr) clears the nth bit. test_and_clear_bit(n, addr) clears the nth bit. cpu_clear(n, cpumask) clears the nth bit (vs. cpus_clear()). bitmap_clear(bitmap, n) clears out all the bits up to n. Moreover, there's a CLEAR_BITMAP() in linux/types.h which bitmap_clear() is a wrapper for. Rename bitmap_clear to bitmap_zero, which is harder to confuse (yes, it bit me), and make everyone use it.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bitmap.h4
-rw-r--r--include/linux/types.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index 2ad5fb97fa26..81e73cdc1a62 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -16,9 +16,9 @@ int bitmap_equal(const unsigned long *bitmap1,
unsigned long *bitmap2, int bits);
void bitmap_complement(unsigned long *bitmap, int bits);
-static inline void bitmap_clear(unsigned long *bitmap, int bits)
+static inline void bitmap_zero(unsigned long *bitmap, int bits)
{
- CLEAR_BITMAP((unsigned long *)bitmap, bits);
+ memset(bitmap, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long));
}
static inline void bitmap_fill(unsigned long *bitmap, int bits)
diff --git a/include/linux/types.h b/include/linux/types.h
index 93f5f3653561..23c414f11cbe 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -8,8 +8,6 @@
(((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
-#define CLEAR_BITMAP(name,bits) \
- memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
#endif
#include <linux/posix_types.h>