From: Takuya Yoshikawa Date: Fri, 21 Sep 2012 01:02:06 +0000 (+1000) Subject: bitops: introduce generic {clear,set}_bit_le() X-Git-Tag: next-20120925~1^2~117 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=79c720ef49fbfbc3bbd5a50bad2a713dd7a6831a;p=karo-tx-linux.git bitops: introduce generic {clear,set}_bit_le() Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is being used for this missing function. Signed-off-by: Takuya Yoshikawa Acked-by: Arnd Bergmann Cc: Marcelo Tosatti Cc: Avi Kivity Signed-off-by: Andrew Morton --- diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index f95c663a6a41..61731543c00e 100644 --- a/include/asm-generic/bitops/le.h +++ b/include/asm-generic/bitops/le.h @@ -54,6 +54,16 @@ static inline int test_bit_le(int nr, const void *addr) return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); } +static inline void set_bit_le(int nr, void *addr) +{ + set_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + +static inline void clear_bit_le(int nr, void *addr) +{ + clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + static inline void __set_bit_le(int nr, void *addr) { __set_bit(nr ^ BITOP_LE_SWIZZLE, addr);