Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3139766pxa; Tue, 25 Aug 2020 12:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8BYeBhX9NZ5O+sFImszUmYglgWRekzGZCSBo9hOkopCItNtzSuf37FDyqukepjEjCQNps X-Received: by 2002:a17:906:4a0d:: with SMTP id w13mr11668377eju.156.1598383859717; Tue, 25 Aug 2020 12:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598383859; cv=none; d=google.com; s=arc-20160816; b=mrXo+FEDUEUAF4C6gioA21qwPhVNxxWmdBY3vzaWBtGTH6rOvn1gxSaJWeGBtqKcz4 b7mxZpGc2wnX2kXkZKKp19bge2LEtbz/u8m2gP0F75oCn4aBMAgsTBQwEWStT4jZY+sr qCBDguvp7f3g6noywXqbUU6mPbgAeozOCMZqEaeUNtsKLi5C3g+sWRxMX16ehlJWdlSs QgMV3CfoJ2YHGHvu+DalXR3DzOHAac3ulMwHQZDmpNoBHQumTNK89waFgD1oOl76+Xne O0gd5mrk4SOtqNQtTvMBshuy6P1wUSXVeRIJ4ZBJDUZza1XxjVFjLZaA+aFZ2T2Mlv6t qe4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/GxI2TZYTyOeqcfVm8ogH4zCN3QUv0rnStUelOysoN4=; b=G/TpaMiMlhh+CDQGN6LPQrymoyU1xejVq6ABU87sJDO7IBi01+a+Z/iLN/9TuQlFyv X5caEuhe/pMwhjAz8IndWkV8nPiGJQ9+MNA2WoBLV/5SxHPx3NVykwQHUarKa+tZxx3M 7+QmOkT9VpPeTMadcdik2Dq9zr+oLeZccTJheuqGLkxiqjOMehUyOFiKlZk6CELuQQIt Hs3UZLg7hcO0w+UBCT48F65kj6t55iWecVab0iNWtpQZyu6z7LqF8JpQ9XaD3OyhvU2S l9j3RYUFdvPE9CENqTe3U3xeozXVqN67lUEbdhQC9cqe8uKw+LyGAg7NfsF2WJPTwu7X BkAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wIRXa+uA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si2416ejc.171.2020.08.25.12.30.33; Tue, 25 Aug 2020 12:30:59 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b=wIRXa+uA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbgHYT1b (ORCPT + 99 others); Tue, 25 Aug 2020 15:27:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:59148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726336AbgHYT1b (ORCPT ); Tue, 25 Aug 2020 15:27:31 -0400 Received: from embeddedor (187-162-31-110.static.axtel.net [187.162.31.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BF6722072D; Tue, 25 Aug 2020 19:27:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598383650; bh=qj5E9gVeNqZwo1UaXkKAeBCLaXdu7GM/ujbqTkU1D/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wIRXa+uAEhm5RpBSamKhPxY4NYOrwu2aji8PDXqaPQdjPpdVdpkzKt8M/nCz71qgi 8Ei7TwqE0o0s6j5gb7LJ7D37YfjV6nPYdThFdzGQpx1UZvBe5dbpSIbmwgBLEmeUCy A2pq47mrNAL0b8/9/KDRL5kRrUM9RyxGHNcTwtU0= Date: Tue, 25 Aug 2020 14:33:27 -0500 From: "Gustavo A. R. Silva" To: Alex Dewar Cc: dennis.dalessandro@intel.com, dledford@redhat.com, gustavo@embeddedor.com, jgg@ziepe.ca, joe@perches.com, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, mike.marciniszyn@intel.com, roland@purestorage.com Subject: Re: [PATCH v2 1/2] IB/qib: remove superfluous fallthrough statements Message-ID: <20200825193327.GA5504@embeddedor> References: <64d7e1c9-9c6a-93f3-ce0a-c24b1c236071@gmail.com> <20200825171242.448447-1-alex.dewar90@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825171242.448447-1-alex.dewar90@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 25, 2020 at 06:12:42PM +0100, Alex Dewar wrote: > Commit 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") > erroneously marked a couple of switch cases as /* FALLTHROUGH */, which > were later converted to fallthrough statements by commit df561f6688fe > ("treewide: Use fallthrough pseudo-keyword"). This triggered a Coverity > warning about unreachable code. > It's worth mentioning that this warning is triggered only by compilers that don't support __attribute__((__fallthrough__)), which has been supported since GCC 7.1. > Remove the fallthrough statements. > > Addresses-Coverity: ("Unreachable code") > Fixes: 36a8f01cd24b ("IB/qib: Add congestion control agent implementation") > Signed-off-by: Alex Dewar Reviewed-by: Gustavo A. R. Silva > --- > v2: Do refactoring in a separate patch (Gustavo) > --- ^^^ These dashes are not needed. Thanks -- Gustavo > drivers/infiniband/hw/qib/qib_mad.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c > index e7789e724f56..f972e559a8a7 100644 > --- a/drivers/infiniband/hw/qib/qib_mad.c > +++ b/drivers/infiniband/hw/qib/qib_mad.c > @@ -2322,7 +2322,6 @@ static int process_cc(struct ib_device *ibdev, int mad_flags, > ret = cc_get_congestion_control_table(ccp, ibdev, port); > goto bail; > > - fallthrough; > default: > ccp->status |= IB_SMP_UNSUP_METH_ATTR; > ret = reply((struct ib_smp *) ccp); > @@ -2339,7 +2338,6 @@ static int process_cc(struct ib_device *ibdev, int mad_flags, > ret = cc_set_congestion_control_table(ccp, ibdev, port); > goto bail; > > - fallthrough; > default: > ccp->status |= IB_SMP_UNSUP_METH_ATTR; > ret = reply((struct ib_smp *) ccp); > -- > 2.28.0 >