[PATCH 3/5] include: compiler: make __must_check a yes-op

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Sep 22 03:47:54 PDT 2026


__must_check is gated behind CONFIG_ENABLE_MUST_CHECK, which we never
define.

Linux removed the option in 1967939462641 ("Compiler Attributes: remove
CONFIG_ENABLE_MUST_CHECK"), so let's do the same.

CI build with -Werror is clean now with it enabled.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/linux/compiler_types.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 798c2e637daa..0e49c6795409 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -357,11 +357,7 @@ struct ftrace_likely_data {
 #endif
 
 
-#ifdef CONFIG_ENABLE_MUST_CHECK
 #define __must_check		__attribute__((warn_unused_result))
-#else
-#define __must_check
-#endif
 
 #if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
 #define notrace			__attribute__((hotpatch(0, 0)))
-- 
2.47.3




More information about the barebox mailing list