projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
byteswap: don't use __builtin_bswap*() with sparse
[cascardo/linux.git]
/
include
/
linux
/
compiler-gcc.h
diff --git
a/include/linux/compiler-gcc.h
b/include/linux/compiler-gcc.h
index
e294939
..
8dbc892
100644
(file)
--- a/
include/linux/compiler-gcc.h
+++ b/
include/linux/compiler-gcc.h
@@
-242,7
+242,11
@@
*/
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
*/
#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP
+/*
+ * sparse (__CHECKER__) pretends to be gcc, but can't do constant
+ * folding in __builtin_bswap*() (yet), so don't set these for it.
+ */
+#if defined(CONFIG_ARCH_USE_BUILTIN_BSWAP) && !defined(__CHECKER__)
#if GCC_VERSION >= 40400
#define __HAVE_BUILTIN_BSWAP32__
#define __HAVE_BUILTIN_BSWAP64__
#if GCC_VERSION >= 40400
#define __HAVE_BUILTIN_BSWAP32__
#define __HAVE_BUILTIN_BSWAP64__
@@
-250,7
+254,7
@@
#if GCC_VERSION >= 40800
#define __HAVE_BUILTIN_BSWAP16__
#endif
#if GCC_VERSION >= 40800
#define __HAVE_BUILTIN_BSWAP16__
#endif
-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */
+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP
&& !__CHECKER__
*/
#if GCC_VERSION >= 50000
#define KASAN_ABI_VERSION 4
#if GCC_VERSION >= 50000
#define KASAN_ABI_VERSION 4