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.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,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 B6AF1C433E1 for ; Mon, 3 Aug 2020 15:41:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B7762076C for ; Mon, 3 Aug 2020 15:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596469314; bh=83m/6Pn2PKOY/u2G126YKwxAO9hcGZRm5Ac0HGFyZTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=zAOU1hqtG1Cjn03pEDibqnZvqe8r8Kl3jGImF8SkFmrWdzJ/8r6gHI0FdSfiGB3hA +1cM78NJO5quhZmUIfHzmHNOaD3n1aoL+ng1auuhXZoAqtOO/GWt3lMAe/Ipu+I1hV IUhCOLK9/jY5dpyFQnG1V620Tap4gsJ3p3tMXN3k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727838AbgHCPly (ORCPT ); Mon, 3 Aug 2020 11:41:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:38438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726478AbgHCPly (ORCPT ); Mon, 3 Aug 2020 11:41:54 -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 4531A20678; Mon, 3 Aug 2020 15:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596469313; bh=83m/6Pn2PKOY/u2G126YKwxAO9hcGZRm5Ac0HGFyZTg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GfjoezEIX/M3g6bg8kG5fP+s2UlQ1Fe2HQveVcZO6oRWqgFNsu7MUncqfC3A6KC8P rND8SZ6dM//AvrkkcIcnOWONx/Vcxjrp0DSvd+q3UN2krO3Kpj1nLefgZVkRgqzmeF Bc6UoPqV72aVREeikd1QjwJD/8+lskT8mz9cGu0s= Date: Mon, 3 Aug 2020 10:48:01 -0500 From: "Gustavo A. R. Silva" To: Dan Carpenter Cc: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH net-next] net/mlx5: remove erroneous fallthrough Message-ID: <20200803154801.GC1726@embeddedor> References: <20200803143448.GA346925@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200803143448.GA346925@mwanda> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Aug 03, 2020 at 05:34:48PM +0300, Dan Carpenter wrote: > This isn't a fall through because it was after a return statement. The > fall through annotation leads to a Smatch warning: > > drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c:246 > mlx5e_ethtool_get_sset_count() warn: ignoring unreachable code. > > Signed-off-by: Dan Carpenter Reviewed-by: Gustavo A. R. Silva Thanks -- Gustavo > --- > drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c > index 08270987c506..48397a577fcd 100644 > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c > @@ -243,7 +243,6 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset) > return MLX5E_NUM_PFLAGS; > case ETH_SS_TEST: > return mlx5e_self_test_num(priv); > - fallthrough; > default: > return -EOPNOTSUPP; > } > -- > 2.27.0 >