mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Marco Elver <elver@google.com>
Cc: Arnd Bergmann <arnd@kernel.org>, David Gow <davidgow@google.com>,
	Arnd Bergmann <arnd@arndb.de>, Dmitry Vyukov <dvyukov@google.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	kasan-dev <kasan-dev@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] kcsan: fix printk format string
Date: Wed, 21 Apr 2021 07:53:02 -0700	[thread overview]
Message-ID: <20210421145302.GS975577@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <CANpmjNM81K-3GhDmzUVdY32kZ_5XOwrT-4zSUDeRHpCs30fa1g@mail.gmail.com>

On Wed, Apr 21, 2021 at 03:59:40PM +0200, Marco Elver wrote:
> On Wed, 21 Apr 2021 at 15:51, Arnd Bergmann <arnd@kernel.org> wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > 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@arndb.de>
> 
> Reviewed-by: Marco Elver <elver@google.com>
> 
> Thank you!
> 
> Normally KCSAN patches go through -rcu, but perhaps in this instance
> it should be picked up into -tip/locking/core directly, so it goes out
> with "kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests".
> Paul, Ingo, do you have a preference?

I am good either way.  I have queued it for the moment, but will remove
it if Ingo takes it.

Acked-by: Paul E. McKenney <paulmck@kernel.org>

> Thanks,
> -- Marco
> 
> > ---
> >  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 9247009295b5..a29e9b1a30c8 100644
> > --- a/kernel/kcsan/kcsan_test.c
> > +++ b/kernel/kcsan/kcsan_test.c
> > @@ -981,7 +981,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) {
> > --
> > 2.29.2

  reply	other threads:[~2021-04-21 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 13:50 Arnd Bergmann
2021-04-21 13:59 ` Marco Elver
2021-04-21 14:53   ` Paul E. McKenney [this message]
2021-04-23  6:52 ` [tip: locking/core] kcsan: Fix " tip-bot2 for Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210421145302.GS975577@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=davidgow@google.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®