linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] compiler-gcc: hide COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW from sparse
@ 2018-11-09  9:35 Johannes Berg
  2018-11-09  9:35 ` [PATCH v2 2/3] kernel.h: hide __is_constexpr() " Johannes Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Johannes Berg @ 2018-11-09  9:35 UTC (permalink / raw)
  To: linux-kernel, akpm; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Sparse doesn't support all the overflow builtins, so just hide
them from it to avoid lots of warnings/errors reported by it.

We could try to teach them to sparse, but the passed types are
variable, and sparse doesn't seem to handle that well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/linux/compiler-gcc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 2010493e1040..3154f2a84571 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -143,7 +143,7 @@
 #define KASAN_ABI_VERSION 3
 #endif
 
-#if GCC_VERSION >= 50100
+#if GCC_VERSION >= 50100 && !defined(__CHECKER__)
 #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1
 #endif
 
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-17 11:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09  9:35 [PATCH v2 1/3] compiler-gcc: hide COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW from sparse Johannes Berg
2018-11-09  9:35 ` [PATCH v2 2/3] kernel.h: hide __is_constexpr() " Johannes Berg
2018-11-17  0:45   ` Luc Van Oostenryck
2018-11-09  9:35 ` [PATCH v2 3/3] slab: use logical instead of bitwise operation in kmalloc_type() Johannes Berg
2018-11-09 18:53   ` Andrew Morton
2018-11-17  0:42 ` [PATCH v2 1/3] compiler-gcc: hide COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW from sparse Luc Van Oostenryck
2018-11-17 11:29   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).