Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <yoshikawa.takuya@oss.ntt.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Takuya Yoshikawa and committed by
Linus Torvalds
b9034bf1 459a1308

+10
+10
include/asm-generic/bitops/le.h
··· 54 54 return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); 55 55 } 56 56 57 + static inline void set_bit_le(int nr, void *addr) 58 + { 59 + set_bit(nr ^ BITOP_LE_SWIZZLE, addr); 60 + } 61 + 62 + static inline void clear_bit_le(int nr, void *addr) 63 + { 64 + clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); 65 + } 66 + 57 67 static inline void __set_bit_le(int nr, void *addr) 58 68 { 59 69 __set_bit(nr ^ BITOP_LE_SWIZZLE, addr);