Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp821795pxk; Sat, 12 Sep 2020 01:12:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygKuAaNyi78QLgspNQuitOCYSOk6dWg6QsVjd/gpITDCzyaJG8c3N7tuGiBVioEOrwuhwZ X-Received: by 2002:a17:906:2659:: with SMTP id i25mr5153168ejc.16.1599898332884; Sat, 12 Sep 2020 01:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599898332; cv=none; d=google.com; s=arc-20160816; b=SfD3VjIzGxdOgzGtpP4EvOoj7MI2P4pOu8BGUdw7EVouY200bxqb9SYg73/Z/ANWqZ feUFR07Hztx43JtjMj8nwHGFx9FzP1kYULLK51CtVqRRgJf/E05Xh3y1oG3gnsl6ncZu O7Rrn07aazqcFOdFRvy5lQEtNcj0BAsY4Bql9akYjUksKbRVja4Q6VIPFLIlmpeyuLHL gCZpyu+UiDZ0nh0+zBuKTuX5s32GDFOWvuGOA08Xymeb53vIFc/pBS26OIWScD3azFzf VI3ZRQU/3Af50qfEycedD2by+788QqNs7zzwoDMfH4QFGdlkFDPQ3WIUBLF+OFf4a3RB 0muA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=S6BIeuTH4c8UFTirUomZ6yd48shrymgfac1FuSfaIbk=; b=hC5RHqruZSs4DYZLD/QqaeJ7R7fajl1eb/4fKZvYSvRpqLyPFZ0OgRYM5MQyurHEVp bwQij/GTKqaKTX37ZZ3Up/mjqHasXUgbPRdpfCyy8sOZvwbbH3cqSA2FxLNEdR4OCZbJ VIs/T18I+hSnJvsro8Z5ULdWuDojwr1yG7CIdhhGpnxlN4pV26457cX2hARxN/8gEzUY ksluf7pik8DskXDbTN/Q1FCIPu+2ogQEQaFuxexOTSHD96wrnLToCeGwMgKVQLo4eF8d /9guBL0qQJDvhmaIjW76ehZbGJ+JMN7ajXygbnCNt4IFA5P+yQ7QATBmD5M0NoR+1Cou F3iA== 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 c4si3120690edw.41.2020.09.12.01.11.50; Sat, 12 Sep 2020 01:12:12 -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 S1725836AbgILIKt (ORCPT + 99 others); Sat, 12 Sep 2020 04:10:49 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59278 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725809AbgILIKr (ORCPT ); Sat, 12 Sep 2020 04:10:47 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 04CE93AEB0A555743A31; Sat, 12 Sep 2020 16:10:44 +0800 (CST) Received: from huawei.com (10.69.192.56) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Sat, 12 Sep 2020 16:10:34 +0800 From: Luo Jiaxing To: , , , CC: , , Subject: [PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit() Date: Sat, 12 Sep 2020 16:08:15 +0800 Message-ID: <1599898095-10712-1-git-send-email-luojiaxing@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We found a set but not used variable 'ring_cons' in mlx4_en_xmit(), it will cause a warning when build the kernel. And after checking the commit record of this function, we found that it was introduced by a previous patch. So, We delete this redundant assignment code. Fixes: 488a9b48e398 ("net/mlx4_en: Wake TX queues only when there's enough room") Signed-off-by: Luo Jiaxing --- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index 9dff7b0..d554344 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c @@ -1075,7 +1075,6 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev) */ smp_rmb(); - ring_cons = READ_ONCE(ring->cons); if (unlikely(!mlx4_en_is_tx_ring_full(ring))) { netif_tx_wake_queue(ring->tx_queue); ring->wake_queue++; -- 2.7.4