Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7987047imm; Thu, 28 Jun 2018 12:35:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkQbuTRrzK3pWiORwodwXCDIvJgkmhMiuSPwQSRxc2GwIIf8PkIqJbMWoOpmRLZaWLN33Z X-Received: by 2002:a17:902:9344:: with SMTP id g4-v6mr11816495plp.10.1530214508361; Thu, 28 Jun 2018 12:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530214508; cv=none; d=google.com; s=arc-20160816; b=LihE+JIXtXEg9BKS/Ru+Tgzex5nuuoUAnhmNGccOevEpm7rbAraJvvAQYSSkSOG8us /w76qrFECGeWjhEXNqeXEHePLy6Zq7djSVZ66KzOItUXYA0e5xQ9rv1BTCFdej3vA0eu V8uWLzoB8E3CrNh9MI8omG0ycjb/u9kkdt1pyF3mPRoQ0z44fpT+lr63RrXxZpAsDaHr Mb5sCSwtL1TFCydSf+wFdXYTzu/dzuGE0fa2Lb218IdYo5nklJmVfuScdaY35my/qaof LRCFgjyQA3FGpnVSvmU1sD6neCM4xub14s4LaPcY+61Icrk5Fwy7TM2QPTdlfG+Eunoa wKBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=KXO3PziymilWW1mqVYj8DgQL8fjVpTN9nH0eDD2GSss=; b=oa9Vr2SHgx2JsqnmT+VYc8jav84TlysQnOMoekMKc0FLkQz7pbaS2ICL6QHAQZPNTB LEy2cSnRrzvyRe9G/Lyqqr/184QmNmJIDmOoR2nNCe2LAjub7OyAPCKw9L9+/TnohlUQ IJYkCRTFCierVAdA+gswnLyd1jAepmwxnInyPxgZcfwKAZ0DtTdClrWvmggHd4KK9DDS ytuGV/+uZs8ZW/2dFdGliS5wWWBXP2W4xojnby0desJfB1vnLp5skIFdqaGmSUrD5ARi K9U73gtDe7AAIvxSvEaCosdcb7w48RcUCgsrvBtvYCcHV0sW40Ffh9KnxWa6l7c4kOYd WWsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13-v6si6250463pgv.374.2018.06.28.12.34.54; Thu, 28 Jun 2018 12:35:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753794AbeF1RmI (ORCPT + 99 others); Thu, 28 Jun 2018 13:42:08 -0400 Received: from gateway31.websitewelcome.com ([192.185.143.47]:19941 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935361AbeF1RmD (ORCPT ); Thu, 28 Jun 2018 13:42:03 -0400 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway31.websitewelcome.com (Postfix) with ESMTP id D485A2F3D9 for ; Thu, 28 Jun 2018 12:42:01 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with SMTP id YavRfi8UiBcCXYavbfT4kk; Thu, 28 Jun 2018 12:42:01 -0500 X-Authority-Reason: nr=8 Received: from [189.250.65.56] (port=59456 helo=embeddedor) by gator4166.hostgator.com with esmtpa (Exim 4.91) (envelope-from ) id 1fYavQ-003SJM-Ji; Thu, 28 Jun 2018 12:41:44 -0500 Date: Thu, 28 Jun 2018 12:41:42 -0500 From: "Gustavo A. R. Silva" To: Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] can: peak_usb: mark expected switch fall-throughs Message-ID: <20180628174142.GA17081@embeddedor.com> 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.250.65.56 X-Source-L: No X-Exim-ID: 1fYavQ-003SJM-Ji X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedor) [189.250.65.56]:59456 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 6 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Signed-off-by: Gustavo A. R. Silva --- drivers/net/can/usb/peak_usb/pcan_usb.c | 1 + drivers/net/can/usb/peak_usb/pcan_usb_core.c | 1 + drivers/net/can/usb/peak_usb/pcan_usb_pro.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/drivers/net/can/usb/peak_usb/pcan_usb.c b/drivers/net/can/usb/peak_usb/pcan_usb.c index f530a80..13238a7 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb.c @@ -423,6 +423,7 @@ static int pcan_usb_decode_error(struct pcan_usb_msg_context *mc, u8 n, new_state = CAN_STATE_ERROR_WARNING; break; } + /* else: fall through */ case CAN_STATE_ERROR_WARNING: if (n & PCAN_USB_ERROR_BUS_HEAVY) { diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c index 50e9114..611f9d3 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c @@ -353,6 +353,7 @@ static netdev_tx_t peak_usb_ndo_start_xmit(struct sk_buff *skb, default: netdev_warn(netdev, "tx urb submitting failed err=%d\n", err); + /* fall through */ case -ENOENT: /* cable unplugged */ stats->tx_dropped++; diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c index 0105fbf..d516def 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c @@ -141,8 +141,10 @@ static int pcan_msg_add_rec(struct pcan_usb_pro_msg *pm, u8 id, ...) switch (id) { case PCAN_USBPRO_TXMSG8: i += 4; + /* fall through */ case PCAN_USBPRO_TXMSG4: i += 4; + /* fall through */ case PCAN_USBPRO_TXMSG0: *pc++ = va_arg(ap, int); *pc++ = va_arg(ap, int); -- 2.7.4