From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 683F2C2BBD1 for ; Thu, 17 Sep 2020 08:10:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3258A2065D for ; Thu, 17 Sep 2020 08:10:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="Xm9muXpL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbgIQIKz (ORCPT ); Thu, 17 Sep 2020 04:10:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbgIQIFJ (ORCPT ); Thu, 17 Sep 2020 04:05:09 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96318C061356 for ; Thu, 17 Sep 2020 01:03:39 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id l9so1043350wme.3 for ; Thu, 17 Sep 2020 01:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TUShtxADeMIRUv08jDyFnIdO2h4AVdi1g89uLOtrWXw=; b=Xm9muXpLMfdw+3JTaQ5+6nxJDSneO0K8th2wgQ0VLh2VI2BmK+XWoQ9cDtIn8+KaRJ B45Xbntr5JjNU8mF7nIZd8VP+CTHviEtF1Um5VazOhr6GEQCgh9bbRNIM6C+XWioNjmk ImuOo8Gi8eD0FtSQ7hHZ1yPAo82BLFHJwGGg0UxKCYs0oMSSpMWIe45dJUN+DzUELaKQ JzvvcS8KVPQMZJTfgm/lLBewbBl9UGKGHM3XV6hYGQwunOqgCSfJKO8sQaLl1M6X9BRD K+XM2hJttDJQqNZl5Xftk9yd2fnhmTZR2ol6vfSH0itoQkT2+o/FcX7saxpuLl0f47l5 EzpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TUShtxADeMIRUv08jDyFnIdO2h4AVdi1g89uLOtrWXw=; b=WWHBg+fqycKuaLLWMc1lAedoantL6nBVt7Ld15OA8fQbCnJawExDubVDuR81xuCOtD BwBMcy18AJ1Z7DnfYHqIn1IzlIJ1hCnmz2AC2+n4aDN+n5Cart4TEee3dJnrxxtBKzNS LHlHyR/zFkglnHgKVxbkXJPKbXZoSZM14ONxpl0Hy+O7jz11cYUc2WRuFvDpoZxZHPCL +DdMue50Yk63yuGIez4kQcuUMd7kmmdAyNfLG9kGOOQF5lIIHAegVQx0bnV5dEyZDTsn tEVfuVFTiDZdL6u84XDYiq5uk9FeNA/8Q6o39wA6Iq8X91/t/sNzbIDShVI65JYjCsQ6 m5UA== X-Gm-Message-State: AOAM533UUBI0LCYVRAjjStUopqD9/PgIMFeUbD4oxq6s6hdLk+zkAx0y op7TiYZH7UuSrPuftCi9OvvQsw== X-Google-Smtp-Source: ABdhPJzTwzfeJOnCQh65prZummqH9JR09Yxja+zvv2OTSAZpPcom4k7xuvXSyH3Yv50qn/8+2aIWyQ== X-Received: by 2002:a1c:e256:: with SMTP id z83mr8793930wmg.33.1600329817598; Thu, 17 Sep 2020 01:03:37 -0700 (PDT) Received: from netronome.com ([2001:982:756:703:d63d:7eff:fe99:ac9d]) by smtp.gmail.com with ESMTPSA id a13sm9836030wme.26.2020.09.17.01.03.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 01:03:36 -0700 (PDT) Date: Thu, 17 Sep 2020 10:03:35 +0200 From: Simon Horman To: Joe Perches Cc: LKML , Jiri Kosina , Kees Cook , Nick Desaulniers , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-crypto@vger.kernel.org, linux-ide@vger.kernel.org, linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-input@vger.kernel.org, linux-i2c@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux-foundation.org, dm-devel@redhat.com, linux-media@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, intel-wired-lan@lists.osuosl.org, oss-drivers@netronome.com, linux-usb@vger.kernel.org, linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-scsi@vger.kernel.org, storagedev@microchip.com, sparclinux@vger.kernel.org, linux-serial@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-parisc@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-afs@lists.infradead.org, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org, bpf@vger.kernel.org, dccp@vger.kernel.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-sctp@vger.kernel.org, alsa-devel Subject: Re: [oss-drivers] [trivial PATCH] treewide: Convert switch/case fallthrough; to break; Message-ID: <20200917080334.GB5769@netronome.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > fallthrough to a separate case/default label break; isn't very readable. > > Convert pseudo-keyword fallthrough; statements to a simple break; when > the next label is case or default and the only statement in the next > label block is break; > > Found using: > > $ grep-2.5.4 -rP --include=*.[ch] -n "fallthrough;(\s*(case\s+\w+|default)\s*:\s*){1,7}break;" * > > Miscellanea: > > o Move or coalesce a couple label blocks above a default: block. > > Signed-off-by: Joe Perches ... > diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c > index 252fe06f58aa..1d5b87079104 100644 > --- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c > +++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c > @@ -345,7 +345,7 @@ static int matching_bar(struct nfp_bar *bar, u32 tgt, u32 act, u32 tok, > baract = NFP_CPP_ACTION_RW; > if (act == 0) > act = NFP_CPP_ACTION_RW; > - fallthrough; > + break; > case NFP_PCIE_BAR_PCIE2CPP_MapType_FIXED: > break; > default: This is a cascading fall-through handling all map types. I don't think this change improves readability. ...