mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
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, 01 Aug 2016 01:18:43 -0400	[thread overview]
Message-ID: <28964.1470028723@turing-police.cc.vt.edu> (raw)
In-Reply-To: <20160801044220.GA97382@ast-mbp.thefacebook.com>

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

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.


[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]

  reply	other threads:[~2016-08-01  5:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01  4:33 Valdis Kletnieks
2016-08-01  4:42 ` Alexei Starovoitov
2016-08-01  5:18   ` Valdis.Kletnieks [this message]
2016-08-01 15:09     ` Alexei Starovoitov

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=28964.1470028723@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=alexei.starovoitov@gmail.com \
    --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

all inboxes | Powered by JetHome®