[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20201206064832.GA6114@ubuntu>
Date: Sun, 6 Dec 2020 15:48:32 +0900
From: Levi Yun <ppbuk5246@...il.com>
To: akpm@...ux-foundation.org, yury.norov@...il.com,
andriy.shevchenko@...ux.intel.com,
richard.weiyang@...ux.alibaba.com, christian.brauner@...ntu.com,
arnd@...db.de, jpoimboe@...hat.com, changbin.du@...el.com,
rdunlap@...radead.org, masahiroy@...nel.org,
gregkh@...uxfoundation.org, peterz@...radead.org,
peter.enderborg@...y.com, krzk@...nel.org,
brendanhiggins@...gle.com, keescook@...omium.org,
broonie@...nel.org, matti.vaittinen@...rohmeurope.com,
mhiramat@...nel.org, jpa@....mail.kapsi.fi, nivedita@...m.mit.edu,
glider@...gle.com, orson.zhai@...soc.com,
takahiro.akashi@...aro.org, clm@...com, josef@...icpanda.com,
dsterba@...e.com, dushistov@...l.ru
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
linux-btrfs@...r.kernel.org
Subject: [PATCH v2 4/8] bitops/le.h: Add le support for find_last_bit
Inspired find_next_*_bit function series, add find_last_zero_bit.
These patch adds declarations for find_last_zero_bit.
This patch is for le support of find_last_bit and find_last_bit_zero.
Signed-off-by: Levi Yun <ppbuk5246@...il.com>
---
include/asm-generic/bitops/le.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h
index 188d3eba3ace..3d6661cc8077 100644
--- a/include/asm-generic/bitops/le.h
+++ b/include/asm-generic/bitops/le.h
@@ -27,6 +27,18 @@ static inline unsigned long find_first_zero_bit_le(const void *addr,
return find_first_zero_bit(addr, size);
}
+static inline unsigned long find_last_bit_le(const void *addr,
+ unsigned long size)
+{
+ return find_last_bit(addr, size);
+}
+
+static inline unsigned long find_last_zero_bit_le(const void *addr,
+ unsigned long size)
+{
+ return find_last_zero_bit(addr, size);
+}
+
#elif defined(__BIG_ENDIAN)
#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
@@ -46,6 +58,14 @@ extern unsigned long find_next_bit_le(const void *addr,
find_next_zero_bit_le((addr), (size), 0)
#endif
+#ifndef find_last_zero_bit_le
+extern unsigned long find_last_zero_bit_le(const void *addr, unsigned long size);
+#endif
+
+#ifndef find_last_bit_le
+extern unsigned long find_last_bit_le(const void *addr, unsigned long size);
+#endif
+
#else
#error "Please fix <asm/byteorder.h>"
#endif
--
2.27.0
Powered by blists - more mailing lists