From: Petr Mladek <pmladek@suse.com>
To: Matteo Croce <mcroce@linux.microsoft.com>
Cc: linux-kernel@vger.kernel.org, Guenter Roeck <linux@roeck-us.net>,
Arnd Bergmann <arnd@arndb.de>, Mike Rapoport <rppt@kernel.org>,
Kees Cook <keescook@chromium.org>,
Pavel Tatashin <pasha.tatashin@soleen.com>,
Robin Holt <robinmholt@gmail.com>,
Fabian Frederick <fabf@skynet.be>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number
Date: Fri, 6 Nov 2020 11:18:27 +0100 [thread overview]
Message-ID: <20201106101827.GK1602@alley> (raw)
In-Reply-To: <CAFnufp3O5GHPdAuY8tm3jGWfSJXnziinTkiKV5ak7nAYWEnOdw@mail.gmail.com>
On Thu 2020-11-05 19:14:27, Matteo Croce wrote:
> On Thu, Nov 5, 2020 at 7:09 PM Petr Mladek <pmladek@suse.com> wrote:
> > > + if (reboot_cpu >= num_possible_cpus()) {
> > > + pr_err("Ignoring the CPU number in reboot= option. "
> > > + "CPU %d exceeds possible cpu number %d\n",
> >
> > ./scripts/checkpatch.pl used to complain that printk() format parameter should stay
> > on a single line (ignoring 80 char limit). It helps when people are
> > trying to find which code printed a particular message.
> >
> > It is not a big deal here because %d does not allow to search the
> > entire message anyway.
> >
> > I am not sure if Andrew would like to get this fixed. In both cases:
> >
> > Reviewed-by: Petr Mladek <pmladek@suse.com>
> >
>
> Yes, I saw this warning, but to suppress it I had to write a 133 char
> line, much beyond even the new 100 char limit.
> I expect a smart user to just grep the first half of the string, like
> "Ignoring the CPU number in reboot="
I agree with checkpatch in this case. IMHO, the more reliable way to
grep the string is more important than the 80 or 100 chars per-line.
That said, it is not a big deal in this case because of the %d.
It requires to search only part of the string anyway.
I am perfectly fine with keeping it as is.
Best Regards,
Petr
next prev parent reply other threads:[~2020-11-06 10:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 21:40 [PATCH v3 0/3] fix parsing of reboot= cmdline Matteo Croce
2020-11-03 21:40 ` [PATCH v3 1/3] Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint" Matteo Croce
2020-11-05 18:02 ` Petr Mladek
2020-11-03 21:40 ` [PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number Matteo Croce
2020-11-05 18:09 ` Petr Mladek
2020-11-05 18:14 ` Matteo Croce
2020-11-06 10:18 ` Petr Mladek [this message]
2020-11-03 21:40 ` [PATCH v3 3/3] reboot: refactor and comment the cpu selection code Matteo Croce
2020-11-05 18:09 ` Petr Mladek
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=20201106101827.GK1602@alley \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=fabf@skynet.be \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mcroce@linux.microsoft.com \
--cc=pasha.tatashin@soleen.com \
--cc=robinmholt@gmail.com \
--cc=rppt@kernel.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