linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/20] Mark expected switch fall-throughs
@ 2018-10-22 20:37 Gustavo A. R. Silva
  2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (19 more replies)
  0 siblings, 20 replies; 28+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-22 20:37 UTC (permalink / raw)
  To: QCA ath9k Development, Christian Lamparter, Stanislaw Gruszka,
	Luis R. Rodriguez, Amitkumar Karwar, Nishant Sarmukadam,
	Ganapathi Bhat, Xinming Hu, Helmut Schaa, Ping-Ke Shih
  Cc: Kalle Valo, linux-wireless, David S. Miller, netdev,
	linux-kernel, Gustavo A. R. Silva, Kees Cook

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

Thanks!

Gustavo A. R. Silva (20):
  ath6kl: Mark expected switch fall-through
  ath9k: mark expected switch fall-through
  ath9k: ar9002_phy: mark expected switch fall-throughs
  ath9k_hw: mark expected switch fall-through
  carl9170: rx: mark expected switch fall-through
  carl9170: tx: mark expected switch fall-throughs
  iwlegacy: 4965-mac: mark expected switch fall-through
  iwlegacy: common: mark expected switch fall-throughs
  orinoco_usb: mark expected switch fall-through
  prism54: isl_38xx: Mark expected switch fall-through
  prism54: isl_ioctl: mark expected switch fall-through
  prism54: islpci_dev: mark expected switch fall-through
  mwifiex: Mark expected switch fall-through
  rt2x00: rt2400pci: mark expected switch fall-through
  rt2x00: rt2500pci: mark expected switch fall-through
  rt2x00: rt2800lib: mark expected switch fall-through
  rt2x00: rt61pci: mark expected switch fall-through
  ray_cs: mark expected switch fall-throughs
  rtlwifi: rtl8821ae: phy: Mark expected switch fall-through
  zd1201: mark expected switch fall-through

 drivers/net/wireless/ath/ath6kl/main.c               | 1 +
 drivers/net/wireless/ath/ath9k/ar5008_phy.c          | 2 +-
 drivers/net/wireless/ath/ath9k/ar9002_phy.c          | 2 +-
 drivers/net/wireless/ath/ath9k/hw.c                  | 1 +
 drivers/net/wireless/ath/carl9170/rx.c               | 1 +
 drivers/net/wireless/ath/carl9170/tx.c               | 3 +++
 drivers/net/wireless/intel/iwlegacy/4965-mac.c       | 2 +-
 drivers/net/wireless/intel/iwlegacy/common.c         | 2 ++
 drivers/net/wireless/intersil/orinoco/orinoco_usb.c  | 1 +
 drivers/net/wireless/intersil/prism54/isl_38xx.c     | 1 +
 drivers/net/wireless/intersil/prism54/isl_ioctl.c    | 1 +
 drivers/net/wireless/intersil/prism54/islpci_dev.c   | 1 +
 drivers/net/wireless/marvell/mwifiex/ie.c            | 1 +
 drivers/net/wireless/ralink/rt2x00/rt2400pci.c       | 2 +-
 drivers/net/wireless/ralink/rt2x00/rt2500pci.c       | 2 +-
 drivers/net/wireless/ralink/rt2x00/rt2800lib.c       | 4 ++++
 drivers/net/wireless/ralink/rt2x00/rt61pci.c         | 2 +-
 drivers/net/wireless/ray_cs.c                        | 2 ++
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 1 +
 drivers/net/wireless/zydas/zd1201.c                  | 1 +
 20 files changed, 27 insertions(+), 6 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 28+ messages in thread
* [PATCH 00/20] mark expected switch fall-throughs
@ 2017-10-12 16:15 Gustavo A. R. Silva
  2017-10-23 19:33 ` Gustavo A. R. Silva
  0 siblings, 1 reply; 28+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-12 16:15 UTC (permalink / raw)
  To: linux-rpi-kernel, linux-arm-kernel, lustre-devel, devel, linux-kernel
  Cc: Oleg Drokin, Andreas Dilger, James Simmons, Greg Kroah-Hartman,
	Ian Abbott, H Hartley Sweeten, Eric Anholt, Stefan Wahren,
	Forest Bond, Gustavo A. R. Silva

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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2018-11-06 17:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-22 20:37 [PATCH 00/20] Mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:37 ` [PATCH 01/20] ath6kl: Mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 21:11   ` Steve deRosier
2018-11-05 11:23   ` Kalle Valo
2018-10-22 20:37 ` [PATCH 02/20] ath9k: ar5008_phy: mark " Gustavo A. R. Silva
2018-11-05 11:16   ` Kalle Valo
2018-10-22 20:38 ` [PATCH 03/20] ath9k: ar9002_phy: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:39 ` [PATCH 04/20] ath9k: hw: mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 20:39 ` [PATCH 05/20] carl9170: rx: " Gustavo A. R. Silva
2018-10-22 20:40 ` [PATCH 06/20] carl9170: tx: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:40 ` [PATCH 07/20] iwlegacy: 4965-mac: mark expected switch fall-through Gustavo A. R. Silva
2018-11-06 17:00   ` Kalle Valo
2018-10-22 20:41 ` [PATCH 08/20] iwlegacy: common: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:42 ` [PATCH 09/20] orinoco_usb: mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 20:42 ` [PATCH 10/20] prism54: isl_38xx: Mark " Gustavo A. R. Silva
2018-10-22 20:42 ` [PATCH 11/20] prism54: isl_ioctl: mark " Gustavo A. R. Silva
2018-10-22 20:43 ` [PATCH 12/20] prism54: islpci_dev: " Gustavo A. R. Silva
2018-10-22 20:43 ` [PATCH 13/20] mwifiex: Mark " Gustavo A. R. Silva
2018-10-22 20:44 ` [PATCH 14/20] rt2x00: rt2400pci: mark " Gustavo A. R. Silva
2018-10-22 20:45 ` [PATCH 15/20] rt2x00: rt2500pci: " Gustavo A. R. Silva
2018-10-22 20:46 ` [PATCH 16/20] rt2x00: rt2800lib: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:46 ` [PATCH 17/20] rt2x00: rt61pci: mark expected switch fall-through Gustavo A. R. Silva
2018-10-22 20:47 ` [PATCH 18/20] ray_cs: mark expected switch fall-throughs Gustavo A. R. Silva
2018-10-22 20:47 ` [PATCH 19/20] rtlwifi: rtl8821ae: phy: Mark expected switch fall-through Gustavo A. R. Silva
2018-10-23  1:24   ` Pkshih
2018-10-22 20:48 ` [PATCH 20/20] zd1201: mark " Gustavo A. R. Silva
  -- strict thread matches above, loose matches on Subject: below --
2017-10-12 16:15 [PATCH 00/20] mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-23 19:33 ` Gustavo A. R. Silva

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).