linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 4/8] bitops/le.h: Add le support for find_last_bit
@ 2020-12-06  6:48 Levi Yun
  0 siblings, 0 replies; only message in thread
From: Levi Yun @ 2020-12-06  6:48 UTC (permalink / raw)
  To: akpm, yury.norov, andriy.shevchenko, richard.weiyang,
	christian.brauner, arnd, jpoimboe, changbin.du, rdunlap,
	masahiroy, gregkh, peterz, peter.enderborg, krzk, brendanhiggins,
	keescook, broonie, matti.vaittinen, mhiramat, jpa, nivedita,
	glider, orson.zhai, takahiro.akashi, clm, josef, dsterba,
	dushistov
  Cc: linux-kernel, linux-arch, linux-btrfs

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@gmail.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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-06  6:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-06  6:48 [PATCH v2 4/8] bitops/le.h: Add le support for find_last_bit Levi Yun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).