bitops/le.h: Add le support for find_last_bit
Subsystems (3)
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 <[email protected]>
--- include/asm-generic/bitops/le.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
include/asm-generic/bitops/le.h +20 -0
@@ -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
Signature · 1 line
2.27.0