lib-inline-_find_next_bit-wrappers.patch removed from -mm tree
The patch titled
Subject: lib: inline _find_next_bit() wrappers
has been removed from the -mm tree. Its filename was
lib-inline-_find_next_bit-wrappers.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Yury Norov <[email protected]>
Subject: lib: inline _find_next_bit() wrappers
lib/find_bit.c declares five single-line wrappers for _find_next_bit(). We may turn those wrappers to inline functions. It eliminates unneeded function calls and opens room for compile-time optimizations.
Signed-off-by Yury Norov <[email protected]>
Acked-by Rasmus Villemoes <[email protected]>
Acked-by Andy Shevchenko <[email protected]>
Cc Alexey Klimov <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc David Sterba <[email protected]>
Cc Dennis Zhou <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Jianpeng Ma <[email protected]>
Cc Joe Perches <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Josh Poimboeuf <[email protected]>
Cc Rich Felker <[email protected]>
Cc Stefano Brivio <[email protected]>
Cc Wei Yang <[email protected]>
Cc Wolfram Sang <[email protected]>
Cc Yoshinori Sato <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/asm-generic/bitops/find.h | 28 +++++++++++--- include/asm-generic/bitops/le.h | 17 ++++++-- lib/find_bit.c | 56 +--------------------------- 3 files changed, 37 insertions(+), 64 deletions(-)
include/asm-generic/bitops/find.h renamed from include/asm-generic/bitops/find.h~lib-inline-_find_next_bit-wrappers +22 -6
@@ -2,6 +2,10 @@#ifndef _ASM_GENERIC_BITOPS_FIND_H_#define _ASM_GENERIC_BITOPS_FIND_H_ +extern unsigned long _find_next_bit (const unsigned long *addr1, +const unsigned long *addr2,unsigned long nbits, +unsigned long start,unsigned long invert,unsigned long le); +#ifndef find_next_bit/** * find_next_bit - find the next set bit in a memory region
@@ -12,8 +16,12 @@* Returns the bit number for the next set bit * If no bits are set, returns @size. */ -extern unsigned long find_next_bit (const unsigned long *addr,unsigned long - size,unsigned long offset); +static inline +unsigned long find_next_bit (const unsigned long *addr,unsigned long size, +unsigned long offset) +{ +return _find_next_bit (addr,NULL , size, offset,0UL ,0 ); +}#endif #ifndef find_next_and_bit
@@ -27,9 +35,13 @@ extern unsigned long find_next_bit(const* Returns the bit number for the next set bit * If no bits are set, returns @size. */ -extern unsigned long find_next_and_bit (const unsigned long *addr1, +static inline +unsigned long find_next_and_bit (const unsigned long *addr1,const unsigned long *addr2,unsigned long size, -unsigned long offset); +unsigned long offset) +{ +return _find_next_bit (addr1, addr2, size, offset,0UL ,0 ); +}#endif #ifndef find_next_zero_bit
@@ -42,8 +54,12 @@ extern unsigned long find_next_and_bit(c* Returns the bit number of the next zero bit * If no bits are zero, returns @size. */ -extern unsigned long find_next_zero_bit (const unsigned long *addr,unsigned -long size,unsigned long offset); +static inline +unsigned long find_next_zero_bit (const unsigned long *addr,unsigned long size, +unsigned long offset) +{ +return _find_next_bit (addr,NULL , size, offset, ~0UL ,0 ); +}#endif #ifdef CONFIG_GENERIC_FIND_FIRST_BIT
include/asm-generic/bitops/le.h renamed from include/asm-generic/bitops/le.h~lib-inline-_find_next_bit-wrappers +13 -4
@@ -2,6 +2,7 @@#ifndef _ASM_GENERIC_BITOPS_LE_H_#define _ASM_GENERIC_BITOPS_LE_H_ +#include <asm-generic/bitops/find.h> #include <asm/types.h> #include <asm/byteorder.h>
@@ -32,13 +33,21 @@ static inline unsigned long find_first_z#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)#ifndef find_next_zero_bit_le -extern unsigned long find_next_zero_bit_le (const void *addr, -unsigned long size,unsigned long offset); +static inline +unsigned long find_next_zero_bit_le (const void *addr,unsigned +long size,unsigned long offset) +{ +return _find_next_bit (addr,NULL , size, offset, ~0UL ,1 ); +}#endif #ifndef find_next_bit_le -extern unsigned long find_next_bit_le (const void *addr, -unsigned long size,unsigned long offset); +static inline +unsigned long find_next_bit_le (const void *addr,unsigned +long size,unsigned long offset) +{ +return _find_next_bit (addr,NULL , size, offset,0UL ,1 ); +}#endif #ifndef find_first_zero_bit_le
lib/find_bit.c renamed from lib/find_bit.c~lib-inline-_find_next_bit-wrappers +2 -54
74 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are