From: Maciej W. Rozycki Date: Fri, 3 Apr 2015 22:25:00 +0000 (+0100) Subject: MIPS: bitops.h: Avoid inline asm for constant FLS X-Git-Tag: omap-for-v4.1/fixes-rc1~111^2~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb5d4aad6844cdbe2f3b9f5d581ae1c9ec342009;p=pandora-kernel.git MIPS: bitops.h: Avoid inline asm for constant FLS GCC is smart enough to substitute the final result for FLS calculations as implemented in the fallback C code we have in `__fls' and `fls' applied to constant values. The presence of inline asm defeats the compiler though, forcing it to emit extraneous CLZ/DCLZ calculation for processors that support these instructions. Use `__builtin_constant_p' then to avoid inline asm altogether for constants. Signed-off-by: Maciej W. Rozycki Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9681/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed