linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compiler.h: Avoid the usage of __typeof_unqual__() when __GENKSYMS__ is defined
@ 2025-04-04 10:24 Uros Bizjak
  2025-04-04 11:20 ` Paul Menzel
                   ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Uros Bizjak @ 2025-04-04 10:24 UTC (permalink / raw)
  To: linux-modules, linux-kbuild, linux-kernel
  Cc: Uros Bizjak, Paul Menzel, Sami Tolvanen, Andrew Morton

Current version of genksyms doesn't know anything about __typeof_unqual__()
operator.  Avoid the usage of __typeof_unqual__() with genksyms to prevent
errors when symbols are versioned.

There were no problems with gendwarfksyms.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Fixes: ac053946f5c40 ("compiler.h: introduce TYPEOF_UNQUAL() macro")
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/lkml/81a25a60-de78-43fb-b56a-131151e1c035@molgen.mpg.de/
Cc: Sami Tolvanen <samitolvanen@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
 include/linux/compiler.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 27725f1ab5ab..98057f93938c 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -229,10 +229,10 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
 /*
  * Use __typeof_unqual__() when available.
  *
- * XXX: Remove test for __CHECKER__ once
- * sparse learns about __typeof_unqual__().
+ * XXX: Remove test for __GENKSYMS__ once "genksyms" handles
+ * __typeof_unqual__(), and test for __CHECKER__ once "sparse" handles it.
  */
-#if CC_HAS_TYPEOF_UNQUAL && !defined(__CHECKER__)
+#if CC_HAS_TYPEOF_UNQUAL && !defined(__GENKSYMS__) && !defined(__CHECKER__)
 # define USE_TYPEOF_UNQUAL 1
 #endif
 
-- 
2.49.0


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

end of thread, other threads:[~2025-04-15  6:17 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 10:24 [PATCH] compiler.h: Avoid the usage of __typeof_unqual__() when __GENKSYMS__ is defined Uros Bizjak
2025-04-04 11:20 ` Paul Menzel
2025-04-04 12:55 ` Masahiro Yamada
2025-04-04 13:11   ` Uros Bizjak
2025-04-04 14:06     ` Masahiro Yamada
2025-04-04 14:37       ` Uros Bizjak
2025-04-04 19:13         ` Masahiro Yamada
2025-04-06 15:36           ` Uros Bizjak
2025-04-09 15:28             ` Borislav Petkov
2025-04-09 15:32               ` Uros Bizjak
2025-04-09 15:38                 ` Borislav Petkov
2025-04-09 18:22                   ` Uros Bizjak
2025-04-13 21:18             ` Uros Bizjak
2025-04-10 10:58 ` [tip: core/urgent] " tip-bot2 for Uros Bizjak
2025-04-11 21:08   ` Borislav Petkov
2025-04-12  8:20     ` Uros Bizjak
2025-04-12  8:55     ` Ingo Molnar
2025-04-13  8:27       ` Uros Bizjak
2025-04-13  8:55         ` Ingo Molnar
2025-04-13 11:05           ` Uros Bizjak
2025-04-13 18:56             ` Ingo Molnar
2025-04-13 19:14               ` Uros Bizjak
2025-04-13 19:20                 ` Ingo Molnar
2025-04-13 19:28                   ` Uros Bizjak
2025-04-13 19:43                     ` Ingo Molnar
2025-04-15  1:20                   ` Andrew Morton
2025-04-15  6:16                     ` Uros Bizjak

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