mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Kees Cook <keescook@chromium.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
Date: Wed, 10 Jul 2019 13:14:10 -0500	[thread overview]
Message-ID: <3fae69d0-2a7e-107f-e054-d2bdef924704@embeddedor.com> (raw)
In-Reply-To: <20190710141526.2f905572@canb.auug.org.au>

Hi Stephen,

On 7/9/19 11:15 PM, Stephen Rothwell wrote:
> Hi Gustavo,
> 
> On Tue, 9 Jul 2019 13:20:10 -0500 "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>
>>   Makefile: Globally enable fall-through warning (2019-07-08 15:23:22 -0500)
> 
> There are still a few of these warnings in various builds.  My x86_64
> allmodconfig build after merging your tree into Linus' tree this
> morning looked like below (which is way better than when you started).
> I reported (most of) these along the way ...
> 
> arch/x86/events/intel/core.c: In function 'intel_pmu_init':
> arch/x86/events/intel/core.c:4959:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    pmem = true;
>    ~~~~~^~~~~~
> arch/x86/events/intel/core.c:4960:2: note: here
>   case INTEL_FAM6_SKYLAKE_MOBILE:
>   ^~~~
> arch/x86/events/intel/core.c:5008:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    pmem = true;
>    ~~~~~^~~~~~
> arch/x86/events/intel/core.c:5009:2: note: here
>   case INTEL_FAM6_ICELAKE_MOBILE:
>   ^~~~

I sent a patch for the warnings above, but it was ignored.

> fs/btrfs/props.c: In function 'inherit_props':
> fs/btrfs/props.c:389:4: warning: 'num_bytes' may be used uninitialized in this function [-Wmaybe-uninitialized]
>     btrfs_block_rsv_release(fs_info, trans->block_rsv,
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>       num_bytes);
>       ~~~~~~~~~~
> drivers/mtd/nand/onenand/onenand_base.c: In function 'onenand_check_features':
> drivers/mtd/nand/onenand/onenand_base.c:3261:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (ONENAND_IS_DDP(this))
>       ^
> drivers/mtd/nand/onenand/onenand_base.c:3281:2: note: here
>   case ONENAND_DEVICE_DENSITY_2Gb:
>   ^~~~
> drivers/mtd/nand/onenand/onenand_base.c:3285:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    this->options |= ONENAND_HAS_UNLOCK_ALL;
> drivers/mtd/nand/onenand/onenand_base.c:3287:2: note: here
>   case ONENAND_DEVICE_DENSITY_1Gb:
>   ^~~~

A patch for the above warnings is already queued up:

https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git/commit/?h=mtd/next&id=db01077c5fffc73fc190d6ce3d68ae083044e4a2

> drivers/net/ethernet/intel/igb/e1000_82575.c: In function 'igb_get_invariants_82575':
> drivers/net/ethernet/intel/igb/e1000_82575.c:636:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (igb_sgmii_uses_mdio_82575(hw)) {
>       ^
> drivers/net/ethernet/intel/igb/e1000_82575.c:642:2: note: here
>   case E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES:
>   ^~~~
> drivers/net/ethernet/intel/igb/igb_main.c: In function '__igb_notify_dca':
> drivers/net/ethernet/intel/igb/igb_main.c:6692:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    if (dca_add_requester(dev) == 0) {
>       ^
> drivers/net/ethernet/intel/igb/igb_main.c:6699:2: note: here
>   case DCA_PROVIDER_REMOVE:
>   ^~~~

Patches for the warnings above have been in Dave's queue for a while:

https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=42277cedbaf40baef50fd4866b448eb791616b0a
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=b7b3ad7aaf4f5b7ef2561ae3462b2efbfbe23b12

> drivers/net/ethernet/intel/i40e/i40e_xsk.c: In function 'i40e_run_xdp_zc':
> drivers/net/ethernet/intel/i40e/i40e_xsk.c:217:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    bpf_warn_invalid_xdp_action(act);
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/i40e/i40e_xsk.c:218:2: note: here
>   case XDP_ABORTED:
>   ^~~~
> 

This is already in Dave's queue:

https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=514af5f0995219da7f18d73ecece6e7d1fec8c4e

At some point during this development cycle, we reached the quota of zero
fall-through warnings, but people continued introducing such warnings. So,
it seems we are now pretty much ready for enabling -Wimplicit-fallthrough
globally. Before it turns into a never ending story. :)

Thanks
--
Gustavo

  reply	other threads:[~2019-07-10 18:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 18:20 Gustavo A. R. Silva
2019-07-10  4:15 ` Stephen Rothwell
2019-07-10 18:14   ` Gustavo A. R. Silva [this message]
2019-07-10 21:36     ` Stephen Rothwell
2019-07-18 20:28       ` Gustavo A. R. Silva
2019-07-21 21:13         ` Gustavo A. R. Silva

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=3fae69d0-2a7e-107f-e054-d2bdef924704@embeddedor.com \
    --to=gustavo@embeddedor.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=torvalds@linux-foundation.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

Powered by JetHome