[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200526145815.6415-5-mcgrof@kernel.org>
Date: Tue, 26 May 2020 14:58:11 +0000
From: Luis Chamberlain <mcgrof@...nel.org>
To: jeyu@...nel.org, davem@...emloft.net, kuba@...nel.org
Cc: michael.chan@...adcom.com, dchickles@...vell.com,
sburla@...vell.com, fmanlunas@...vell.com, aelior@...vell.com,
GR-everest-linux-l2@...vell.com, kvalo@...eaurora.org,
johannes@...solutions.net, akpm@...ux-foundation.org,
arnd@...db.de, rostedt@...dmis.org, mingo@...hat.com,
aquini@...hat.com, cai@....pw, dyoung@...hat.com, bhe@...hat.com,
peterz@...radead.org, tglx@...utronix.de, gpiccoli@...onical.com,
pmladek@...e.com, tiwai@...e.de, schlad@...e.de,
andriy.shevchenko@...ux.intel.com, derosier@...il.com,
keescook@...omium.org, daniel.vetter@...ll.ch, will@...nel.org,
mchehab+samsung@...nel.org, vkoul@...nel.org,
mchehab+huawei@...nel.org, robh@...nel.org, mhiramat@...nel.org,
sfr@...b.auug.org.au, linux@...inikbrodowski.net,
glider@...gle.com, paulmck@...nel.org, elver@...gle.com,
bauerman@...ux.ibm.com, yamada.masahiro@...ionext.com,
samitolvanen@...gle.com, yzaikin@...gle.com, dvyukov@...gle.com,
rdunlap@...radead.org, corbet@....net, dianders@...omium.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, Luis Chamberlain <mcgrof@...nel.org>
Subject: [PATCH v3 4/8] panic: make taint data type clearer
Let us be clearer about the the data type for the taint flag.
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
---
include/asm-generic/bug.h | 4 ++--
include/linux/kernel.h | 4 ++--
kernel/panic.c | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index c94e33ae3e7b..87dbe57301f4 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -80,7 +80,7 @@ struct bug_entry {
*/
#ifndef __WARN_FLAGS
extern __printf(4, 5)
-void warn_slowpath_fmt(const char *file, const int line, unsigned taint,
+void warn_slowpath_fmt(const char *file, const int line, unsigned int taint,
const char *fmt, ...);
#define __WARN() __WARN_printf(TAINT_WARN, NULL)
#define __WARN_printf(taint, arg...) do { \
@@ -110,7 +110,7 @@ extern __printf(1, 2) void __warn_printk(const char *fmt, ...);
struct warn_args;
struct pt_regs;
-void __warn(const char *file, int line, void *caller, unsigned taint,
+void __warn(const char *file, int line, void *caller, unsigned int taint,
struct pt_regs *regs, struct warn_args *args);
#ifndef WARN_ON
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a1974907c320..d154844eb9cd 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -563,8 +563,8 @@ enum lockdep_ok {
LOCKDEP_STILL_OK,
LOCKDEP_NOW_UNRELIABLE
};
-extern void add_taint(unsigned flag, enum lockdep_ok);
-extern int test_taint(unsigned flag);
+extern void add_taint(unsigned int flag, enum lockdep_ok);
+extern int test_taint(unsigned int flag);
extern unsigned long get_taint(void);
extern int root_mountflags;
diff --git a/kernel/panic.c b/kernel/panic.c
index cb1c5619e983..3cfe84318ecf 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -421,7 +421,7 @@ const char *print_tainted(void)
return buf;
}
-int test_taint(unsigned flag)
+int test_taint(unsigned int flag)
{
return test_bit(flag, &tainted_mask);
}
@@ -440,7 +440,7 @@ unsigned long get_taint(void)
* If something bad has gone wrong, you'll want @lockdebug_ok = false, but for
* some notewortht-but-not-corrupting cases, it can be set to true.
*/
-void add_taint(unsigned flag, enum lockdep_ok lockdep_ok)
+void add_taint(unsigned int flag, enum lockdep_ok lockdep_ok)
{
if (lockdep_ok == LOCKDEP_NOW_UNRELIABLE && __debug_locks_off()) {
pr_warn("Disabling lock debugging due to kernel taint\n");
@@ -579,7 +579,7 @@ struct warn_args {
va_list args;
};
-void __warn(const char *file, int line, void *caller, unsigned taint,
+void __warn(const char *file, int line, void *caller, unsigned int taint,
struct pt_regs *regs, struct warn_args *args)
{
disable_trace_on_warning();
@@ -622,7 +622,7 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
}
#ifndef __WARN_FLAGS
-void warn_slowpath_fmt(const char *file, int line, unsigned taint,
+void warn_slowpath_fmt(const char *file, int line, unsigned int taint,
const char *fmt, ...)
{
struct warn_args args;
--
2.26.2
Powered by blists - more mailing lists