Skip to content

Commit b9034bf

Browse files
Takuya Yoshikawatorvalds
Takuya Yoshikawa
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 <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Cc: Marcelo Tosatti <[email protected]> Cc: Avi Kivity <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 459a130 commit b9034bf

File tree

1 file changed

+10
-0
lines changed
  • include/asm-generic/bitops

1 file changed

+10
-0
lines changed

include/asm-generic/bitops/le.h

+10
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)