From patchwork Thu Nov 9 03:02:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 10050081 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E45FE601EA for ; Thu, 9 Nov 2017 03:48:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB5C52A9DD for ; Thu, 9 Nov 2017 03:48:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B05FB2A9E3; Thu, 9 Nov 2017 03:48:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8EE42A9DD for ; Thu, 9 Nov 2017 03:48:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751550AbdKIDsr (ORCPT ); Wed, 8 Nov 2017 22:48:47 -0500 Received: from gateway23.websitewelcome.com ([192.185.49.179]:43874 "EHLO gateway23.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbdKIDsr (ORCPT ); Wed, 8 Nov 2017 22:48:47 -0500 X-Greylist: delayed 1467 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 Nov 2017 22:48:47 EST Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway23.websitewelcome.com (Postfix) with ESMTP id DF67A46CC for ; Wed, 8 Nov 2017 21:02:50 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id Cd7CezQ99c72gCd7CewVZc; Wed, 08 Nov 2017 21:02:50 -0600 Received: from [189.175.248.21] (port=34370 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1eCd7C-001Mue-Ix; Wed, 08 Nov 2017 21:02:50 -0600 Date: Wed, 8 Nov 2017 21:02:50 -0600 From: "Gustavo A. R. Silva" To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] Input: sidewinder - mark expected switch fall-throughs Message-ID: <20171109030250.GA13692@embeddedor.com> MIME-Version: 1.0 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.175.248.21 X-Source-L: No X-Exim-ID: 1eCd7C-001Mue-Ix X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.175.248.21]:34370 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 2 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 114763 Addresses-Coverity-ID: 114764 Addresses-Coverity-ID: 114765 Addresses-Coverity-ID: 114766 Signed-off-by: Gustavo A. R. Silva --- drivers/input/joystick/sidewinder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index 4a95b22..5e602a6 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c @@ -672,16 +672,16 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) switch (i * m) { case 60: - sw->number++; + sw->number++; /* fall through */ case 45: /* Ambiguous packet length */ if (j <= 40) { /* ID length less or eq 40 -> FSP */ case 43: sw->type = SW_ID_FSP; break; } - sw->number++; + sw->number++; /* fall through */ case 30: - sw->number++; + sw->number++; /* fall through */ case 15: sw->type = SW_ID_GP; break; @@ -697,9 +697,9 @@ static int sw_connect(struct gameport *gameport, struct gameport_driver *drv) sw->type = SW_ID_PP; break; case 66: - sw->bits = 3; + sw->bits = 3; /* fall through */ case 198: - sw->length = 22; + sw->length = 22; /* fall through */ case 64: sw->type = SW_ID_3DP; if (j == 160)