[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220426032007.510245-1-starzhangzsd@gmail.com>
Date: Tue, 26 Apr 2022 11:20:07 +0800
From: Stephen Zhang <starzhangzsd@...il.com>
To: arnd@...db.de, tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org
Cc: hpa@...or.com, peterz@...radead.org, laijs@...ux.alibaba.com,
lihuafei1@...wei.com, fenghua.yu@...el.com,
chang.seok.bae@...el.com, zhangshida@...inos.cn,
starzhangzsd@...il.com, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2] bug: make __warn unconditionally defined
From: Shida Zhang <zhangshida@...inos.cn>
__warn() was defined when CONFIG_BUG gets defined originally, but
it was used unconditonally by traps.c. So the idea is to have the
__warn unconditional.
Signed-off-by: Shida Zhang <zhangshida@...inos.cn>
---
Changelog in v1 -> v2:
- To have the __warn() unconditional instead.
include/asm-generic/bug.h | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
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) ({ \
--
2.30.2
Powered by blists - more mailing lists