linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sparse: use the _Generic() version of __unqual_scalar_typeof()
@ 2020-06-18 22:26 Luc Van Oostenryck
  2020-06-19  8:23 ` Will Deacon
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Luc Van Oostenryck @ 2020-06-18 22:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: linux-kernel, Luc Van Oostenryck, Marco Elver, Borislav Petkov,
	Will Deacon

If the file is being checked with sparse, use the version of
__unqual_scalar_typeof() using _Generic(), leaving the unoptimized
version only for the oldest versions of GCC.

This reverts commit
  b398ace5d2ea ("compiler_types.h: Use unoptimized __unqual_scalar_typeof for sparse")

Note: a recent version of sparse will be needed (minimum v0.6.2-rc2
       or later than 2020-05-28).

Cc: Marco Elver <elver@google.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Will Deacon <will@kernel.org>
Link: https://marc.info/?l=linux-sparse&m=159233481816454
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 include/linux/compiler_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index e368384445b6..e34a1080f36b 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -254,7 +254,7 @@ struct ftrace_likely_data {
  * __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving
  *			       non-scalar types unchanged.
  */
-#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900) || defined(__CHECKER__)
+#if defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900
 /*
  * We build this out of a couple of helper macros in a vain attempt to
  * help you keep your lunch down while reading it.
-- 
2.27.0


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

end of thread, other threads:[~2020-07-08 19:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 22:26 [PATCH] sparse: use the _Generic() version of __unqual_scalar_typeof() Luc Van Oostenryck
2020-06-19  8:23 ` Will Deacon
2020-06-19  9:51 ` Marco Elver
2020-06-19 14:12   ` Luc Van Oostenryck
2020-06-19 18:26 ` Linus Torvalds
2020-06-19 19:08   ` Luc Van Oostenryck
2020-06-20  4:32 ` kernel test robot
2020-07-08 19:02 ` Linus Torvalds

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).