public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] mark expected switch fall-throughs
@ 2017-10-25 18:48 Gustavo A. R. Silva
  2017-10-25 18:48 ` [PATCH 1/9] usb: host: fotg210-hcd: mark expected switch fall-through Gustavo A. R. Silva
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Gustavo A. R. Silva @ 2017-10-25 18:48 UTC (permalink / raw)
  To: linux-usb, linux-kernel
  Cc: Greg Kroah-Hartman, Mathias Nyman, Alan Stern,
	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 "else FALL THROUGH" or "then fallthrough..."
comments already in place. So I replaced them with proper "fall through"
comments, which is what GCC is expecting to find.

Thanks!

Gustavo A. R. Silva (9):
  usb: host: fotg210-hcd: mark expected switch fall-through
  usb: host: xhci: mark expected switch fall-through
  usb: host: xhci-mem: mark expected switch fall-through
  usb: host: ohci-hcd: mark expected switch fall-through
  usb: host: ehci-hcd: mark expected switch fall-through
  usb: host: isp1362-hcd: mark expected switch fall-through
  usb: host: oxu210hp-hcd: mark expected switch fall-through
  usb: host: xhci-hub: mark expected switch fall-through
  usb: host: pci-quirks: mark expected switch fall-through

 drivers/usb/host/ehci-hcd.c     | 2 +-
 drivers/usb/host/fotg210-hcd.c  | 2 +-
 drivers/usb/host/isp1362-hcd.c  | 1 +
 drivers/usb/host/ohci-hcd.c     | 2 +-
 drivers/usb/host/oxu210hp-hcd.c | 2 +-
 drivers/usb/host/pci-quirks.c   | 2 +-
 drivers/usb/host/xhci-hub.c     | 1 +
 drivers/usb/host/xhci-mem.c     | 1 +
 drivers/usb/host/xhci.c         | 1 +
 9 files changed, 9 insertions(+), 5 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-11-01 17:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-25 18:48 [PATCH 0/9] mark expected switch fall-throughs Gustavo A. R. Silva
2017-10-25 18:48 ` [PATCH 1/9] usb: host: fotg210-hcd: mark expected switch fall-through Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 2/9] usb: host: xhci: " Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 3/9] usb: host: xhci-mem: " Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 4/9] usb: host: ohci-hcd: " Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 5/9] usb: host: ehci-hcd: " Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 6/9] usb: host: isp1362-hcd: " Gustavo A. R. Silva
2017-10-25 19:05   ` Gustavo A. R. Silva
2017-11-01 16:01     ` Greg Kroah-Hartman
2017-11-01 17:27       ` Gustavo A. R. Silva
2017-11-01 17:38         ` Greg Kroah-Hartman
2017-11-01 17:41           ` Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 7/9] usb: host: oxu210hp-hcd: " Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 8/9] usb: host: xhci-hub: " Gustavo A. R. Silva
2017-10-25 18:49 ` [PATCH 9/9] usb: host: pci-quirks: " 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