From patchwork Thu Nov 9 03:07:12 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: 10050071 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 71503601EB for ; Thu, 9 Nov 2017 03:29:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65242283F9 for ; Thu, 9 Nov 2017 03:29:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59CBE2A976; Thu, 9 Nov 2017 03:29:55 +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 DCD4E283F9 for ; Thu, 9 Nov 2017 03:29:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751958AbdKID3y (ORCPT ); Wed, 8 Nov 2017 22:29:54 -0500 Received: from gateway31.websitewelcome.com ([192.185.143.33]:12717 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbdKID3x (ORCPT ); Wed, 8 Nov 2017 22:29:53 -0500 X-Greylist: delayed 1360 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 Nov 2017 22:29:53 EST Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 4827524EFB9 for ; Wed, 8 Nov 2017 21:07:13 -0600 (CST) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id CdBRehM6l5b6TCdBRev7z0; Wed, 08 Nov 2017 21:07:13 -0600 Received: from [189.175.248.21] (port=34380 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1eCdBQ-001Qcy-V7; Wed, 08 Nov 2017 21:07:13 -0600 Date: Wed, 8 Nov 2017 21:07:12 -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: gamecon - mark expected switch fall-throughs Message-ID: <20171109030712.GA14989@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: 1eCdBQ-001Qcy-V7 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.175.248.21]:34380 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 5 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: 114761 Addresses-Coverity-ID: 114762 Signed-off-by: Gustavo A. R. Silva --- drivers/input/joystick/gamecon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/joystick/gamecon.c b/drivers/input/joystick/gamecon.c index c43f087..ca734ea 100644 --- a/drivers/input/joystick/gamecon.c +++ b/drivers/input/joystick/gamecon.c @@ -654,6 +654,7 @@ static void gc_psx_report_one(struct gc_pad *pad, unsigned char psx_type, input_report_key(dev, BTN_THUMBL, ~data[0] & 0x04); input_report_key(dev, BTN_THUMBR, ~data[0] & 0x02); + /* fall through */ case GC_PSX_NEGCON: case GC_PSX_ANALOG: @@ -887,6 +888,7 @@ static int gc_setup_pad(struct gc *gc, int idx, int pad_type) case GC_SNES: for (i = 4; i < 8; i++) __set_bit(gc_snes_btn[i], input_dev->keybit); + /* fall through */ case GC_NES: for (i = 0; i < 4; i++) __set_bit(gc_snes_btn[i], input_dev->keybit); @@ -894,6 +896,7 @@ static int gc_setup_pad(struct gc *gc, int idx, int pad_type) case GC_MULTI2: __set_bit(BTN_THUMB, input_dev->keybit); + /* fall through */ case GC_MULTI: __set_bit(BTN_TRIGGER, input_dev->keybit); break;