[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <161916077643.29796.8670414298244363723.tip-bot2@tip-bot2>
Date: Fri, 23 Apr 2021 06:52:56 -0000
From: "tip-bot2 for Arnd Bergmann" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Marco Elver <elver@...gle.com>,
"Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: locking/core] kcsan: Fix printk format string
The following commit has been merged into the locking/core branch of tip:
Commit-ID: f4abe9967c6fdb511ee567e129a014b60945ab93
Gitweb: https://git.kernel.org/tip/f4abe9967c6fdb511ee567e129a014b60945ab93
Author: Arnd Bergmann <arnd@...db.de>
AuthorDate: Wed, 21 Apr 2021 15:50:38 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Thu, 22 Apr 2021 14:36:03 +02:00
kcsan: Fix printk format string
Printing a 'long' variable using the '%d' format string is wrong
and causes a warning from gcc:
kernel/kcsan/kcsan_test.c: In function 'nthreads_gen_params':
include/linux/kern_levels.h:5:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Werror=format=]
Use the appropriate format modifier.
Fixes: f6a149140321 ("kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Reviewed-by: Marco Elver <elver@...gle.com>
Acked-by: Paul E. McKenney <paulmck@...nel.org>
Link: https://lkml.kernel.org/r/20210421135059.3371701-1-arnd@kernel.org
---
kernel/kcsan/kcsan_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kcsan/kcsan_test.c b/kernel/kcsan/kcsan_test.c
index b71751f..8bcffbd 100644
--- a/kernel/kcsan/kcsan_test.c
+++ b/kernel/kcsan/kcsan_test.c
@@ -984,7 +984,7 @@ static const void *nthreads_gen_params(const void *prev, char *desc)
const long min_required_cpus = 2 + min_unused_cpus;
if (num_online_cpus() < min_required_cpus) {
- pr_err_once("Too few online CPUs (%u < %d) for test\n",
+ pr_err_once("Too few online CPUs (%u < %ld) for test\n",
num_online_cpus(), min_required_cpus);
nthreads = 0;
} else if (nthreads >= num_online_cpus() - min_unused_cpus) {
Powered by blists - more mailing lists