Messages in this thread Patch in this message | | | Date | Sun, 6 Dec 2020 15:48:32 +0900 | From | Levi Yun <> | 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@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
| |