* [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
@ 2019-07-09 18:20 Gustavo A. R. Silva
2019-07-10 4:15 ` Stephen Rothwell
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-09 18:20 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Kees Cook, Greg KH, linux-kernel, Gustavo A. R. Silva
The following changes since commit cd6c84d8f0cdc911df435bb075ba22ce3c605b07:
Linux 5.2-rc2 (2019-05-26 16:49:19 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git tags/Wimplicit-fallthrough-5.3-rc1
for you to fetch changes up to d93512ef0f0efa17eded6b9edf8e88e8418f44bd:
Makefile: Globally enable fall-through warning (2019-07-08 15:23:22 -0500)
----------------------------------------------------------------
Wimplicit-fallthrough patches for 5.3-rc1
Hi Linus,
Please, pull the following patches that mark switch cases where we are
expecting to fall through. These patches are part of the ongoing efforts
to enable -Wimplicit-fallthrough. All of them have been baking in linux-next
for a whole development cycle.
Also, pull the Makefile patch that universally enables the
-Wimplicit-fallthrough option.
Thanks
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
----------------------------------------------------------------
Gustavo A. R. Silva (6):
afs: fsclient: Mark expected switch fall-throughs
afs: yfsclient: Mark expected switch fall-throughs
can: mark expected switch fall-throughs
firewire: mark expected switch fall-throughs
platform/x86: acer-wmi: Mark expected switch fall-throughs
Makefile: Globally enable fall-through warning
Documentation/process/deprecated.rst | 14 +++++++
Makefile | 3 ++
drivers/firewire/core-device.c | 2 +-
drivers/firewire/core-iso.c | 2 +-
drivers/firewire/core-topology.c | 1 +
drivers/net/can/at91_can.c | 6 ++-
drivers/net/can/peak_canfd/peak_pciefd_main.c | 2 +-
drivers/net/can/spi/mcp251x.c | 3 +-
drivers/net/can/usb/peak_usb/pcan_usb.c | 2 +-
drivers/platform/x86/acer-wmi.c | 4 ++
fs/afs/fsclient.c | 51 ++++++++++++++++---------
fs/afs/yfsclient.c | 54 +++++++++++++++++----------
12 files changed, 100 insertions(+), 44 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
2019-07-09 18:20 [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1 Gustavo A. R. Silva
@ 2019-07-10 4:15 ` Stephen Rothwell
2019-07-10 18:14 ` Gustavo A. R. Silva
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2019-07-10 4:15 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Linus Torvalds, Kees Cook, Greg KH, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2992 bytes --]
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:
^~~~
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:
^~~~
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:
^~~~
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:
^~~~
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
2019-07-10 4:15 ` Stephen Rothwell
@ 2019-07-10 18:14 ` Gustavo A. R. Silva
2019-07-10 21:36 ` Stephen Rothwell
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-10 18:14 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: Linus Torvalds, Kees Cook, Greg KH, linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
2019-07-10 18:14 ` Gustavo A. R. Silva
@ 2019-07-10 21:36 ` Stephen Rothwell
2019-07-18 20:28 ` Gustavo A. R. Silva
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2019-07-10 21:36 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Linus Torvalds, Kees Cook, Greg KH, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 611 bytes --]
Hi Gustavo,
On Wed, 10 Jul 2019 13:14:10 -0500 "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
> 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. :)
Sounds good to me. My mail was, I guess, just a heads up to Linus that
he will see some new warnings in his test build if he merges your
tree. Thanks for addressing them.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
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
0 siblings, 1 reply; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-18 20:28 UTC (permalink / raw)
To: Linus Torvalds, Stephen Rothwell; +Cc: Kees Cook, Greg KH, linux-kernel
On 7/10/19 4:36 PM, Stephen Rothwell wrote:
> Hi Gustavo,
>
> On Wed, 10 Jul 2019 13:14:10 -0500 "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>
>> 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. :)
>
> Sounds good to me. My mail was, I guess, just a heads up to Linus that
> he will see some new warnings in his test build if he merges your
> tree. Thanks for addressing them.
>
Yep. Thanks, Stephen.
Linus:
After you have merged all the trees containing fall-through patches, you might
see the following warnings:
arch/x86/events/intel/core.c:4957:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/x86/events/intel/core.c:5006:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
drivers/mtd/nand/onenand/onenand_base.c:3261:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
for which I already have patches ready to be applied, but I didn't include them
in my pull-request because such patches don't apply to 5.2-rc2, on which I based
my -next tree for v5.3.
We can coordinate and I can send you the patches that address those and any other
warning that you might see after merging my pull-request and just before you release
5.3-rc1. So we can have the -Wimplicit-fallthrough option globally enabled in
5.3-rc1 and zero fall-through warnings.
What do you think?
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1
2019-07-18 20:28 ` Gustavo A. R. Silva
@ 2019-07-21 21:13 ` Gustavo A. R. Silva
0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2019-07-21 21:13 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Stephen Rothwell, Kees Cook, Greg KH, linux-kernel
Hi Linus,
I noticed you didn't merge these changes in v5.3-rc1.
Should I send them again for rc2?
Do you have any comments on this pull-request?
Thanks
--
Gustavo
On 7/18/19 3:28 PM, Gustavo A. R. Silva wrote:
>
>
> On 7/10/19 4:36 PM, Stephen Rothwell wrote:
>> Hi Gustavo,
>>
>> On Wed, 10 Jul 2019 13:14:10 -0500 "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>>
>>> 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. :)
>>
>> Sounds good to me. My mail was, I guess, just a heads up to Linus that
>> he will see some new warnings in his test build if he merges your
>> tree. Thanks for addressing them.
>>
> Yep. Thanks, Stephen.
>
> Linus:
>
> After you have merged all the trees containing fall-through patches, you might
> see the following warnings:
>
> arch/x86/events/intel/core.c:4957:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
> arch/x86/events/intel/core.c:5006:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
> drivers/mtd/nand/onenand/onenand_base.c:3261:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
>
> for which I already have patches ready to be applied, but I didn't include them
> in my pull-request because such patches don't apply to 5.2-rc2, on which I based
> my -next tree for v5.3.
>
> We can coordinate and I can send you the patches that address those and any other
> warning that you might see after merging my pull-request and just before you release
> 5.3-rc1. So we can have the -Wimplicit-fallthrough option globally enabled in
> 5.3-rc1 and zero fall-through warnings.
>
> What do you think?
>
> Thanks
> --
> Gustavo
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-07-21 21:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-09 18:20 [GIT PULL] Wimplicit-fallthrough patches for 5.3-rc1 Gustavo A. R. Silva
2019-07-10 4:15 ` Stephen Rothwell
2019-07-10 18:14 ` Gustavo A. R. Silva
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
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.