From: Andrew Halaney <ahalaney@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] init/main.c: silence some -Wunused-parameter warnings
Date: Thu, 20 May 2021 08:03:30 -0500 [thread overview]
Message-ID: <20210520130330.hqejx2xw6kbdibil@halaneylaptop> (raw)
In-Reply-To: <20210519213731.fd8699098bf79bfd23c73090@linux-foundation.org>
On Wed, May 19, 2021 at 09:37:31PM -0700, Andrew Morton wrote:
> On Wed, 19 May 2021 11:23:41 -0500 Andrew Halaney <ahalaney@redhat.com> wrote:
>
> > There's a bunch of callbacks with unused arguments, go ahead and silence
> > those so "make KCFLAGS=-W init/main.o" is a little quieter.
> > Here's a little sample:
>
> Do we care about -Wunused-parameter? I suppose we do, as it might
> point us at small code optimizations.
>
> How voluminous is the warning output from -Wunused-parameter? Small
> enough to be useful or large enough to be useless?
>
That's something I was wondering too. The output from compiling with -W
is _very_ loud, to the point where it is almost pointless to do it. Even
with this patch applied I get 1679 warnings generated when doing a
recompile of init/main.o - all but one of them from headers included.
The motivation was brought up because item 20 in [1] says:
20) Newly-added code has been compiled with ``gcc -W`` (use
``make KCFLAGS=-W``). This will generate lots of noise, but is good
for finding bugs like "warning: comparison between signed and unsigned".
and while none of this is newly added code, I found it pretty hard to
discern in a prior patch here if I was causing extra noise or not.
Thought I'd chip away at the noise.
If we decide we don't care about such warnings then feel free to ignore
this patch, but since I was playing around here anyways I thought I'd
clean it up a little. My preference would be to care, but the output is
so loud it is easy to make the argument that it is too late to start
caring.
Thanks,
Andrew
[1] https://www.kernel.org/doc/html/latest/process/submit-checklist.html#submitchecklist
next prev parent reply other threads:[~2021-05-20 13:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 16:23 Andrew Halaney
2021-05-20 4:37 ` Andrew Morton
2021-05-20 13:03 ` Andrew Halaney [this message]
2021-05-21 7:34 ` Rasmus Villemoes
2021-10-18 13:58 ` Andrew Halaney
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=20210520130330.hqejx2xw6kbdibil@halaneylaptop \
--to=ahalaney@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®