[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANubcdWq5hN8HSs8KhzhipzzjTver0CafHL6uXfyAEVOtmsS2A@mail.gmail.com>
Date: Tue, 26 Apr 2022 09:23:30 +0800
From: Stephen Zhang <starzhangzsd@...il.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Dave Hansen <dave.hansen@...el.com>, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
x86@...nel.org, hpa@...or.com, laijs@...ux.alibaba.com,
lihuafei1@...wei.com, fenghua.yu@...el.com,
chang.seok.bae@...el.com, zhangshida <zhangshida@...inos.cn>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/traps: add CONFIG_BUG to the use of __warn()
> As pointed out by Boris, __warn is actually uncondtionally defined in
> panic.c, the below seems to build.
>
> ---
> diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
> index edb0e2a602a8..ba1f860af38b 100644
> --- a/include/asm-generic/bug.h
> +++ b/include/asm-generic/bug.h
> @@ -21,6 +21,12 @@
> #include <linux/panic.h>
> #include <linux/printk.h>
>
> +struct warn_args;
> +struct pt_regs;
> +
> +void __warn(const char *file, int line, void *caller, unsigned taint,
> + struct pt_regs *regs, struct warn_args *args);
> +
> #ifdef CONFIG_BUG
>
> #ifdef CONFIG_GENERIC_BUG
> @@ -110,11 +116,6 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
> #endif
>
> /* used internally by panic.c */
> -struct warn_args;
> -struct pt_regs;
> -
> -void __warn(const char *file, int line, void *caller, unsigned taint,
> - struct pt_regs *regs, struct warn_args *args);
>
> #ifndef WARN_ON
> #define WARN_ON(condition) ({ \
Thanks.I will make a new version based on this suggestion.
Powered by blists - more mailing lists