Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2333464pxb; Sat, 21 Nov 2020 18:49:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAJXAWUQ22qe+k1gFa2k/lwvOmDqMPDZKq4qrjZy6zKrrEC10zz8hQYc1kLAjzTH7jYHgH X-Received: by 2002:a05:6402:31b6:: with SMTP id dj22mr43064937edb.348.1606013385200; Sat, 21 Nov 2020 18:49:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606013385; cv=none; d=google.com; s=arc-20160816; b=jiLFIqx0t+HkCuR7bCERe+pi8yaB7VHi2KArZ5GXitGdDmIu28WcgKgUYCz0rAf+3m iZzlq5QfrFQVc307rt4TCKlQ9QJmHggSAnYs2oV83/5FGMAfZC+OxhopvFlMnk8+jb9u jtVS2Or2Gcmm9jOqVAKLX4wtqkaHwbMpNlMKndcFIpp0ch3jo3oF7f3xBKosUM7aoXXs RiDBJ56wxlB1zkhaMrziODfGCEC53SGP6xBu/t796T29MkKFxoxEldMJ6C0UbvdujAMi eDq2bSoT4P4peGjRnF4wuH2/K1b99vLzswbHmCV6du/KCz7JMHO2Sdiv1fNQTMsTTP4a eFtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=XeBs0d2yx3hXDrX9JFqh/OOO86Ad7zfOGlLuLO0zsuE=; b=k5hgbdymTnp5gVoqkMpeP3qWrBD3jNjKpOf5eGikGw6Y1Jquxf8Pk36AMpSq+LBrLN Ia7ECP/jBo4x8Y2ArNkwgOFbv+EGKIdt1qAR4WRbDN8Ylugic6u46tlSNPexsG5tRLKy 6kPuzBFhqqNNszf9ze9f9GN4Ur/PN7GVGPD/ZhGVREz2nHr807VE5v+aO3yrvhZyyhr/ FOHTTBv5RlX7jM09sZqIMRV41mIuRA3R+PkyF+ZfAOR3wmgqQlNtIBVaIAyDUnw1fdwh eLc1QzuEFVZ4i7n5T/cgSp7fUPyYauvSXRmd4M34XmOMZgQ4qYTsUkiUstCG7vzQS5Ui aP3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx4si4189791edb.505.2020.11.21.18.49.20; Sat, 21 Nov 2020 18:49:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727027AbgKVCqZ (ORCPT + 99 others); Sat, 21 Nov 2020 21:46:25 -0500 Received: from smtprelay0147.hostedemail.com ([216.40.44.147]:57810 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726544AbgKVCqZ (ORCPT ); Sat, 21 Nov 2020 21:46:25 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 3F9DB100E7B40; Sun, 22 Nov 2020 02:46:24 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1801:2393:2559:2562:2828:2898:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3874:4250:4321:4605:5007:6119:10004:10400:10848:11026:11232:11233:11657:11658:11783:11914:12043:12048:12297:12438:12740:12895:13069:13311:13357:13439:13894:14181:14659:14721:21080:21627:21990:30046:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: coil29_120f78c27359 X-Filterd-Recvd-Size: 2917 Received: from XPS-9350.home (unknown [47.151.128.180]) (Authenticated sender: joe@perches.com) by omf10.hostedemail.com (Postfix) with ESMTPA; Sun, 22 Nov 2020 02:46:22 +0000 (UTC) Message-ID: <13a35c0a0d446b72c2f83fda1651dea924707345.camel@perches.com> Subject: Re: [PATCH 072/141] can: peak_usb: Fix fall-through warnings for Clang From: Joe Perches To: Marc Kleine-Budde , "Gustavo A. R. Silva" , Wolfgang Grandegger , "David S. Miller" , Jakub Kicinski Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Date: Sat, 21 Nov 2020 18:46:21 -0800 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-11-22 at 00:04 +0100, Marc Kleine-Budde wrote: > On 11/21/20 8:50 PM, Joe Perches wrote: > > > What about moving the default to the end if the case, which is more common anyways: > > > > > > diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c > > [] > > > @@ -295,16 +295,16 @@ static void peak_usb_write_bulk_callback(struct urb *urb) > > > ????????????????netif_trans_update(netdev); > > > ????????????????break; > > > ? > > > > > > - default: > > > - if (net_ratelimit()) > > > - netdev_err(netdev, "Tx urb aborted (%d)\n", > > > - urb->status); > > > ????????case -EPROTO: > > > ????????case -ENOENT: > > > ????????case -ECONNRESET: > > > ????????case -ESHUTDOWN: > > > - > > > ????????????????break; > > > + > > > + default: > > > + if (net_ratelimit()) > > > + netdev_err(netdev, "Tx urb aborted (%d)\n", > > > + urb->status); > > > > That's fine and is more generally used style but this > > default: case should IMO also end with a break; > > > > + break; > > I don't mind. > > process/coding-style.rst is not totally clear about the break after the default, > if this is the lase one the switch statement. deprecated.rst has: All switch/case blocks must end in one of: * break; * fallthrough; * continue; * goto