summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2020-10-21 18:19:09 +0300
committerArnd Bergmann <arnd@arndb.de>2020-10-26 19:00:29 +0300
commit6f6573a4044adefbd07f1bd951a2041150e888d7 (patch)
tree291c3d97663858fe8f44446f99871848dbbf71e4 /include/asm-generic
parent80b4707a2f16e8a018543635ebe31cae53783c72 (diff)
downloadlinux-6f6573a4044adefbd07f1bd951a2041150e888d7.tar.xz
asm-generic: fix ffs -Wshadow warning
gcc -Wshadow warns about the ffs() definition that has the same name as the global ffs() built-in: include/asm-generic/bitops/builtin-ffs.h:13:28: warning: declaration of 'ffs' shadows a built-in function [-Wshadow] This is annoying because 'make W=2' warns every time this header gets included. Change it to use a #define instead, making callers directly reference the builtin. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bitops/builtin-ffs.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/asm-generic/bitops/builtin-ffs.h b/include/asm-generic/bitops/builtin-ffs.h
index 458c85ebcd15..1dacfdb4247e 100644
--- a/include/asm-generic/bitops/builtin-ffs.h
+++ b/include/asm-generic/bitops/builtin-ffs.h
@@ -10,9 +10,6 @@
* the libc and compiler builtin ffs routines, therefore
* differs in spirit from the above ffz (man ffs).
*/
-static __always_inline int ffs(int x)
-{
- return __builtin_ffs(x);
-}
+#define ffs(x) __builtin_ffs(x)
#endif