netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Valdis.Kletnieks@vt.edu
Cc: Alexei Starovoitov <ast@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c with W=1
Date: Mon, 1 Aug 2016 08:09:57 -0700	[thread overview]
Message-ID: <20160801150955.GA99277@ast-mbp.thefacebook.com> (raw)
In-Reply-To: <28964.1470028723@turing-police.cc.vt.edu>

On Mon, Aug 01, 2016 at 01:18:43AM -0400, Valdis.Kletnieks@vt.edu wrote:
> On Sun, 31 Jul 2016 21:42:22 -0700, Alexei Starovoitov said:
> 
> > and at least 2 other such patches for other files...
> > Is there a single warning where -Woverride-init was useful?
> > May be worth disabling this warning for the whole build?
> 
> There's a few other cases that *aren't* the "define the array to zero
> and then build the entries from a list" form.
> 
> In particular, there's still 3 odd complaints:
> 
> drivers/ata/ahci.c:
> drivers/ata/ahci.h:393:16: warning: initialized field overwritten [-Woverride-in
> it]
>   .can_queue  = AHCI_MAX_CMDS - 1,
> 
> drivers/block/drbd/drbd_main.c:
> drivers/block/drbd/drbd_main.c:3767:22: warning: initialized field overwritten [
> -Woverride-init]
>    [P_RETRY_WRITE]  = "retry_write",
> 
> arch/x86/kernel/cpu/common.c:
> ./arch/x86/include/asm/page_64_types.h:22:21: warning: initialized field overwri
> tten [-Woverride-init]
>  #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
> 
> The point of these patches is to make -Woverride-init *useful* - you'll never
> spot 3 warnings in a flood of over 9,000 understood-and-ignored warnings.
> 
> Get rid of the 9,000 understood-and-ignored warnings, and then things that
> probably *should* be looked at can be noticed.

I don't think it makes sense to play kernel whack-a-warning in a hope that
particular warning will find something useful.
Please show few cases where it actually found a real issue, otherwise
just disable it for all.

      reply	other threads:[~2016-08-01 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01  4:33 [PATCH v2] bpf: silence warnings when building kernel/bpf/core.c with W=1 Valdis Kletnieks
2016-08-01  4:42 ` Alexei Starovoitov
2016-08-01  5:18   ` Valdis.Kletnieks
2016-08-01 15:09     ` Alexei Starovoitov [this message]

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=20160801150955.GA99277@ast-mbp.thefacebook.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=ast@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).