Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1513392ybj; Tue, 5 May 2020 23:19:49 -0700 (PDT) X-Google-Smtp-Source: APiQypK4dOon5GQxfNlKhziHaop+BS1MzOIl5rzmr/23U/OP3b8WLpQmeq9YtXTstigFxSCP80mW X-Received: by 2002:aa7:c499:: with SMTP id m25mr5352091edq.122.1588745989785; Tue, 05 May 2020 23:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588745989; cv=none; d=google.com; s=arc-20160816; b=E5xWz6J9VRWL41qbwlkK6KTHKmOrt7iNnA6t0h49KZ++7OViCoD7/VR4lLg6ytRu9o XvHm4qihRYFNfkO4D59E5X+WIZE33yokwY02akvn4vI6UqPusi1p7zHMODzQPdnQ5xNu +FbYEd4lGi1jrI0PF383PLoIselb4EhkEUxufFK7ebsXnHOK6WoKDE9qAH+vxEXqFoZW 4VP913sFBy/5BZSUNsMetrlg372Rr7R3OES4Gvm0M3al6gRANHtz8DTh658luaqrodp9 O3DsRtioFcC31aEfokgsmscCkP5TqvyfZl8zuG8MQmCsNOQRQMFADJ9oFudVt1bap5Fj 3cfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=ftCUBhmXmv44RZw7eG44ZZoFRbRkJpiuJu8eIiljxsg=; b=uOsg8jfVtuL5YrsGQPv3tmhFLKF1ORiH3HTw/Bi/kHdeXaVnZlk98/sdN374qeMidJ QJN8fNh9y/q/1+RHtPtaR23e/zpkib90wfjzlg0UtVTJzHfIGEc12lAPHZqr3pXknksr Hk/WNbmrp4vUnl7zSMOmNuVsSwb++o49GZVoKpXLMmSDzfzNJD2Za9s4TeiY/PgThzh5 R/VP9isM3Vc+z7ft+Fx6QpGIMmP/t4IvVz1tSyHZH9vt55VrrQ3l+s2NCs4MFVS7Q/Lg mzk8ft3xiQUAhW/hlyps2PrT/59YHQVq14ZYuUYQfNJebvUgJN3k/GnXrqZS1C7NjqV4 YStw== 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 s8si553441eji.349.2020.05.05.23.19.26; Tue, 05 May 2020 23:19:49 -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; 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 S1727930AbgEFGRT (ORCPT + 99 others); Wed, 6 May 2020 02:17:19 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57678 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725873AbgEFGRT (ORCPT ); Wed, 6 May 2020 02:17:19 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B6409B257A0EA51397D2; Wed, 6 May 2020 14:17:16 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Wed, 6 May 2020 14:17:09 +0800 From: Jason Yan To: , , , , , , , , , , CC: Jason Yan Subject: [PATCH net-next] net: mlx4: remove unneeded variable "err" in mlx4_en_get_rxfh() Date: Wed, 6 May 2020 14:16:30 +0800 Message-ID: <20200506061630.19010-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: drivers/net/ethernet/mellanox/mlx4/en_ethtool.c:1238:5-8: Unneeded variable: "err". Return "0" on line 1252 Signed-off-by: Jason Yan --- drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 8a5ea2543670..216e6b2e9eed 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -1235,7 +1235,6 @@ static int mlx4_en_get_rxfh(struct net_device *dev, u32 *ring_index, u8 *key, struct mlx4_en_priv *priv = netdev_priv(dev); u32 n = mlx4_en_get_rxfh_indir_size(dev); u32 i, rss_rings; - int err = 0; rss_rings = priv->prof->rss_rings ?: n; rss_rings = rounddown_pow_of_two(rss_rings); @@ -1249,7 +1248,7 @@ static int mlx4_en_get_rxfh(struct net_device *dev, u32 *ring_index, u8 *key, memcpy(key, priv->rss_key, MLX4_EN_RSS_KEY_SIZE); if (hfunc) *hfunc = priv->rss_hash_fn; - return err; + return 0; } static int mlx4_en_set_rxfh(struct net_device *dev, const u32 *ring_index, -- 2.21.1