]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
bitops: introduce generic {clear,set}_bit_le()
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Fri, 28 Sep 2012 00:20:21 +0000 (10:20 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:01:23 +0000 (14:01 +1000)
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>
include/asm-generic/bitops/le.h

index f95c663a6a4169f6a7ae2258623aeebec6d661c9..61731543c00ea381fb8954c69b834b976260c0db 100644 (file)
@@ -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);