]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/bug: Put HAVE_ARCH_BUG_FORMAT_ARGS WARN definitions inside __ASSEMBLER__
authorSean Christopherson <seanjc@google.com>
Thu, 23 Apr 2026 14:54:18 +0000 (07:54 -0700)
committerDave Hansen <dave.hansen@linux.intel.com>
Mon, 27 Apr 2026 19:02:57 +0000 (12:02 -0700)
Extend the !assembly #ifdef guarding x86's custom WARN helpers to cover the
WARN macros themselves, as they aren't assembly friendly.  This helps make
it clear that things like __WARN_validate_printf() don't need a dummy
definition for assembly code.

No functional change intended.

Suggested-by: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Link: https://patch.msgid.link/20260423145419.459988-3-seanjc@google.com
arch/x86/include/asm/bug.h

index bf3c802654d18a86f32771df1a36c71b6c9fcb5b..23ab0543826952f691d640b1529a0495f38aa86b 100644 (file)
@@ -154,7 +154,6 @@ struct arch_va_list {
 };
 extern void *__warn_args(struct arch_va_list *args, struct pt_regs *regs);
 static __always_inline __printf(1, 2) void __WARN_validate_printf(const char *fmt, ...) { }
-#endif /* __ASSEMBLER__ */
 
 #define __WARN_bug_entry(flags, format) ({                             \
        struct bug_entry *bug;                                          \
@@ -189,6 +188,7 @@ do {                                                                        \
        }                                                               \
        __ret_warn_on;                                                  \
 })
+#endif /* __ASSEMBLER__ */
 
 #endif /* HAVE_ARCH_BUG_FORMAT_ARGS */