Skip to content

Commit

Permalink
bitops: introduce generic {clear,set}_bit_le()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takuya Yoshikawa authored and Linus Torvalds committed Oct 5, 2012
1 parent 459a130 commit b9034bf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/asm-generic/bitops/le.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b9034bf

Please sign in to comment.