From b9034bf1e96fb8b1bf1b22ca2d3ea2aa7467e5a8 Mon Sep 17 00:00:00 2001 From: Takuya Yoshikawa Date: Thu, 4 Oct 2012 17:13:07 -0700 Subject: 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 Signed-off-by: Linus Torvalds --- include/asm-generic/bitops/le.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/asm-generic/bitops') diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h index f95c663a6a4..61731543c00 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); -- cgit v1.2.3-70-g09d2