Skip to content

mark expected switch fall-throughs

Gustavo A. R. Silva linux-arm-kernel lkml lustre-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20staging: ks7010: ks_wlan_net: mark expected switch fall-throughsdrivers/staging/ks7010/ks_wlan_net.c+10 -00 replies
2/20staging: lustre: lnet: socklnd: mark expected switch fall-throughdrivers/staging/lustre/lnet/klnds/socklnd/socklnd.c+1 -11 reply
3/20staging: rtl8192e: mark expected switch fall-throughdrivers/staging/rtl8192e/rtllib_wx.c+1 -20 replies
4/20staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-throughdrivers/staging/rtl8723bs/core/rtw_mlme_ext.c+1 -10 replies
5/20staging: lustre: lnet: net_fault: mark expected switch fall-throughdrivers/staging/lustre/lnet/lnet/net_fault.c+1 -01 reply
6/20staging: comedi: s526: mark expected switch fall-throughdrivers/staging/comedi/drivers/s526.c+2 -30 replies
7/20staging: rtl8188eu: usb_halinit: mark expected switch fall-throughdrivers/staging/rtl8188eu/hal/usb_halinit.c+1 -00 replies
8/20staging: vc04_services: vchiq_core: mark expected switch fall-throughdrivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c+1 -21 reply
9/20staging: vt6656: card: mark expected switch fall-throughsdrivers/staging/vt6656/card.c+2 -00 replies
10/20staging: rtl8188eu: usb_ops_linux: mark expected switch fall-throughdrivers/staging/rtl8188eu/os_dep/usb_ops_linux.c+1 -00 replies
11/20staging: r8822be: mark expected switch fall-throughsdrivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c+2 -00 replies
12/20staging: lustre: lnet: selftest: mark expected switch fall-throughdrivers/staging/lustre/lnet/selftest/conctl.c+1 -01 reply
13/20staging: rtlwifi: halmac: mark expected switch fall-throughdrivers/staging/rtlwifi/halmac/rtl_halmac.c+1 -10 replies
14/20staging: lustre: lnet: selftest: mark expected switch fall-throughsdrivers/staging/lustre/lnet/selftest/module.c+4 -11 reply
15/20staging: lustre: llite: mark expected switch fall-throughdrivers/staging/lustre/lustre/llite/namei.c+3 -11 reply
16/20staging: lustre: lprocfs: mark expected switch fall-throughsdrivers/staging/lustre/lustre/obdclass/lprocfs_status.c+4 -01 reply
17/20staging: lustre: ldlm: mark expected switch fall-throughdrivers/staging/lustre/lustre/ldlm/ldlm_request.c+1 -01 reply
18/20staging: lustre: osc: mark expected switch fall-throughdrivers/staging/lustre/lustre/osc/osc_cache.c+1 -01 reply
19/20staging: lustre: ptlrpc: mark expected switch fall-throughsdrivers/staging/lustre/lustre/ptlrpc/pack_generic.c+3 -31 reply
20/20staging: lustre: rpc: mark expected switch fall-throughsdrivers/staging/lustre/lnet/selftest/rpc.c+9 -41 reply

Reviews trailers per patch

11 of 20 patches have a Reviewed-by or Acked-by.

PatchStefan WahrenAndreas Dilger
1/20
2/20R-b
3/20
4/20
5/20R-b
6/20
7/20
8/20A-b
9/20
10/20
11/20
12/20R-b
13/20
14/20R-b
15/20R-b
16/20R-b
17/20R-b
18/20R-b
19/20R-b
20/20R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/20] mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, this patchset aims to mark switch cases where we are expecting to fall through.

In Kees Cook words:
"This is an unfortunate omission in the C language, and thankfully both gcc and clang have stepped up to solve this the same way static analyzers have solved it. It does both document the intention for humans and provide a way for analyzers to report issues.

Having the compiler help us not make mistakes is quite handy."

In some cases there were "no break" or "fall thru" comments already in place. So I replaced them with proper "fall through" comments, which is what GCC is expecting to find.

For the rest of the cases, please double check if the actual intention of the code is to fall through.

Thanks!

Gustavo A. R. Silva (20):
staging: ks7010: ks_wlan_net: mark expected switch fall-throughs
staging: lustre: lnet: socklnd: mark expected switch fall-through
staging: rtl8192e: mark expected switch fall-through
staging: rtl8723bs: rtw_mlme_ext: mark expected switch fall-through
staging: lustre: lnet: net_fault: mark expected switch fall-through
staging: comedi: s526: mark expected switch fall-through
staging: rtl8188eu: usb_halinit: mark expected switch fall-through
staging: vc04_services: vchiq_core: mark expected switch fall-through
staging: vt6656: card: mark expected switch fall-throughs
staging: rtl8188eu: usb_ops_linux: mark expected switch fall-through
staging: r8822be: mark expected switch fall-throughs
staging: lustre: lnet: selftest: mark expected switch fall-through
staging: rtlwifi: halmac: mark expected switch fall-through
staging: lustre: lnet: selftest: mark expected switch fall-throughs
staging: lustre: llite: mark expected switch fall-through
staging: lustre: lprocfs: mark expected switch fall-throughs
staging: lustre: ldlm: mark expected switch fall-through
staging: lustre: osc: mark expected switch fall-through
staging: lustre: ptlrpc: mark expected switch fall-throughs
staging: lustre: rpc: mark expected switch fall-throughs

 drivers/staging/comedi/drivers/s526.c                       |  5 ++---
 drivers/staging/ks7010/ks_wlan_net.c                        | 10 ++++++++++
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c         |  2 +-
 drivers/staging/lustre/lnet/lnet/net_fault.c                |  1 +
 drivers/staging/lustre/lnet/selftest/conctl.c               |  1 +
 drivers/staging/lustre/lnet/selftest/module.c               |  5 ++++-
 drivers/staging/lustre/lnet/selftest/rpc.c                  | 13 +++++++++----
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c           |  1 +
 drivers/staging/lustre/lustre/llite/namei.c                 |  4 +++-
 drivers/staging/lustre/lustre/obdclass/lprocfs_status.c     |  4 ++++
 drivers/staging/lustre/lustre/osc/osc_cache.c               |  1 +
 drivers/staging/lustre/lustre/ptlrpc/pack_generic.c         |  6 +++---
 drivers/staging/rtl8188eu/hal/usb_halinit.c                 |  1 +
 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c            |  1 +
 drivers/staging/rtl8192e/rtllib_wx.c                        |  3 +--
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c               |  2 +-
 .../staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c    |  2 ++
 drivers/staging/rtlwifi/halmac/rtl_halmac.c                 |  2 +-
 .../staging/vc04_services/interface/vchiq_arm/vchiq_core.c  |  3 +--
 drivers/staging/vt6656/card.c                               |  2 ++
 20 files changed, 50 insertions(+), 19 deletions(-)
Signature · 1 line
2.7.4