Skip to content

Commit b9034bf

Browse files
Takuya Yoshikawatorvalds
authored andcommitted
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>
1 parent 459a130 commit b9034bf

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • include/asm-generic/bitops

‎include/asm-generic/bitops/le.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ static inline int test_bit_le(int nr, const void *addr)
5454
return test_bit(nr ^ BITOP_LE_SWIZZLE, addr);
5555
}
5656

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+
5767
static inline void __set_bit_le(int nr, void *addr)
5868
{
5969
__set_bit(nr ^ BITOP_LE_SWIZZLE, addr);

0 commit comments

Comments
 (0)