Re: [PATCH v2 20/22] bitops: remove ext2 non-atomic bitops from asm/bitops.h

From: Andreas Dilger
Date: Thu Oct 21 2010 - 13:52:24 EST


On 2010-10-21, at 08:41, Akinobu Mita wrote:
> As the result of conversions, there are no users of ext2 non-atomic bit
> operations except for ext2 file system itself. Now we can put them
> into architecture independent code in ext2 file system, and remove
> from asm/bitops.h for all architectures.

Presumably there will be a separate patch series to remove the atomic ext2 bitops? I was going to suggest removing the ext2 comment in bitops.h, but I notice that there are still the atomic bitops left.

In any case, thanks for your efforts. I agree that these ext2_* functions have no place in the generic code, and are only there for historical reasons.

> --- a/arch/arm/include/asm/bitops.h
> +++ b/arch/arm/include/asm/bitops.h
> @@ -327,22 +327,10 @@ static inline int fls(int x)
> * Ext2 is defined to use little-endian byte ordering.
> * These do not need to be atomic.
> */
> -#define ext2_set_bit(nr,p) \
> - __test_and_set_le_bit(nr, (unsigned long *)(p))
> #define ext2_set_bit_atomic(lock,nr,p) \
> test_and_set_le_bit(nr, (unsigned long *)(p))
> -#define ext2_clear_bit(nr,p) \
> - __test_and_clear_le_bit(nr, (unsigned long *)(p))
> #define ext2_clear_bit_atomic(lock,nr,p) \
> test_and_clear_le_bit(nr, (unsigned long *)(p))
> -#define ext2_test_bit(nr,p) \
> - test_le_bit(nr, (unsigned long *)(p))
> -#define ext2_find_first_zero_bit(p,sz) \
> - find_first_zero_le_bit((unsigned long *)(p), sz)
> -#define ext2_find_next_zero_bit(p,sz,off) \
> - find_next_zero_le_bit((unsigned long *)(p), sz, off)
> -#define ext2_find_next_bit(p, sz, off) \
> - find_next_le_bit((unsigned long *)(p), sz, off)


Cheers, Andreas





--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/