From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932321AbdJYSsi (ORCPT ); Wed, 25 Oct 2017 14:48:38 -0400 Received: from gateway34.websitewelcome.com ([192.185.148.164]:39176 "EHLO gateway34.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbdJYSsg (ORCPT ); Wed, 25 Oct 2017 14:48:36 -0400 Date: Wed, 25 Oct 2017 13:48:33 -0500 From: "Gustavo A. R. Silva" To: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Mathias Nyman , Alan Stern , "Gustavo A. R. Silva" Subject: [PATCH 0/9] mark expected switch fall-throughs Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 189.145.38.148 X-Exim-ID: 1e7QjD-004LuK-GP X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.145.38.148]:34626 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 2 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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