Skip to content

Commit

Permalink
[ARM] 3032/1: sparse: complains about generic_fls() prototype in asm-…
Browse files Browse the repository at this point in the history
…arm/bitops.h

Patch from Ian Campbell

Sparse complains about the definition of generic_fls in asm-arm/bitops.h:
  CHECK   /home/icampbell/devel/kernel/2.6/arch/arm/mach-pxa/viper.c
include2/asm/bitops.h:350:34: error: marked inline, but without a definition

The definition is unnecessary since linux/bitops.h defines generic_fls before including asm/bitops.h and asm/bitops.h should not be included directly. There are still some places where asm/bitops.h is directly included, but I think that code should be fixed. I was a little wary of the patch for this reason but lubbock, mainstone and assabet all build OK and so do my in house boards...

ARM is the only arch with the generic_fls prototype in this way.

Signed-off-by: Ian Campbell <icampbell@arcom.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Ian Campbell authored and Russell King committed Oct 26, 2005
1 parent c34e152 commit 7edc24c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion include/asm-arm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ static inline unsigned long __ffs(unsigned long word)
* the clz instruction for much better code efficiency.
*/

static __inline__ int generic_fls(int x);
#define fls(x) \
( __builtin_constant_p(x) ? generic_fls(x) : \
({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) )
Expand Down

0 comments on commit 7edc24c

Please sign in to comment.