From 79c720ef49fbfbc3bbd5a50bad2a713dd7a6831a Mon Sep 17 00:00:00 2001 From: Takuya Yoshikawa Date: Fri, 21 Sep 2012 11:02:06 +1000 Subject: [PATCH] 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 --- include/asm-generic/bitops/le.h | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 2.39.5