From 8447ac2688647d261af7a7397a53548a2a1afc13 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 12 Apr 2004 01:03:29 -0700 Subject: [PATCH] Rename bitmap_clear to bitmap_zero, remove CLEAR_BITMAP From: Rusty Russell 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. --- include/linux/bitmap.h | 4 ++-- include/linux/types.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'include/linux') 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 -- cgit v1.2.3