Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1740398pxk; Sun, 13 Sep 2020 14:34:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxB62rJEiJocesgJSRsqohKg6oppWS+tRwyWu+GVUzxNtfj4foWYJlYdBP9eKiCqbVthMsw X-Received: by 2002:a17:906:c0d0:: with SMTP id bn16mr342525ejb.279.1600032848511; Sun, 13 Sep 2020 14:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600032848; cv=none; d=google.com; s=arc-20160816; b=wz+DbJj9SaDwOUvcyBkc31zH4J65BUJiECV3apMLsY6ZCZrf5X5/uEewCFoGDHBeyy q5OWOBkn0qMhy3jRzsP9ZZykP9nusd5oT6FZgbj856ooNf0+f+Dz7X67trJUBVkEvtEO iJ1jfuMCBTt9a4haxTvfPK9xDQ4qOi709R9JOcYK1w27+VVmxU+jzltCMIraGcAgj9T6 C8nUaZ8pdsPinbW+OUsqG4yX4gQ1h1I8cet259uvFD5R050s5hIf6WCE5gLDOImQVS8i nSQfHDEb8k5yb7PbT8EbPgipdfPKMDBRwx8dAwsxSn8EPYsQN1gDMlDWNtWDPPIl7jmW X8Ag== 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 :references:in-reply-to:from:subject:cc:to:message-id:date; bh=S6Aja5kt9Sf+/IU3R01T3eXV8zlldbZ7H1y6DXrsyAE=; b=sFr0uXRCzly4q+hnepCASDofe85xN2vFycPkSHHAoRXe4Vd9aFLRNPyL5RFHgO7vtg QVbOxtiaV7jpmmv18gzesPNLYSjEHa6Z31cCTKYG660LI+8BIt/hUITHVK2dlHZMKT0j kjXo1PE14428MjGhHXKxSNk/uZWk43os/wSw2gEPCsyxWOn8CIcVctdRcsj5CIAb+/yo Cjej42zBSOiBj7TjvyfODZZhAanmgIYjPitEzIc+f4XxIESqngdaB3ZeYqZPnAz+dVKB vAzHbuiMGi7Zooau3l+Xf7HGNb9ZfqHAHDDUMOU3jT7zMOyHohVaEE93nqxKfOv7Wela KjEA== 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 p8si6257600edi.48.2020.09.13.14.33.45; Sun, 13 Sep 2020 14:34:08 -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 S1725960AbgIMVdP (ORCPT + 99 others); Sun, 13 Sep 2020 17:33:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbgIMVdM (ORCPT ); Sun, 13 Sep 2020 17:33:12 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 334DDC06174A; Sun, 13 Sep 2020 14:33:11 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id C6BBA12814447; Sun, 13 Sep 2020 14:16:22 -0700 (PDT) Date: Sun, 13 Sep 2020 14:33:08 -0700 (PDT) Message-Id: <20200913.143308.2042080994542358655.davem@davemloft.net> To: ttoukan.linux@gmail.com Cc: luojiaxing@huawei.com, kuba@kernel.org, idos@mellanox.com, ogerlitz@mellanox.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com Subject: Re: [PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit() From: David Miller In-Reply-To: References: <1599898095-10712-1-git-send-email-luojiaxing@huawei.com> <20200912.182219.1013721666435098048.davem@davemloft.net> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [2620:137:e000::1:9]); Sun, 13 Sep 2020 14:16:23 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tariq Toukan Date: Sun, 13 Sep 2020 13:12:05 +0300 > > > On 9/13/2020 4:22 AM, David Miller wrote: >> From: Luo Jiaxing >> Date: Sat, 12 Sep 2020 16:08:15 +0800 >> >>> 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 >> Looks good, applied, thanks. >> > > Hi Luo, > > I didn't get a chance to review it during the weekend. Tariq, what are you even commenting on? Are you responding to this patch which removes a %100 obviously unused variable set, or on the commit mentioned in the Fixes: tag? > The ring_cons local variable is used in line 903: > https://elixir.bootlin.com/linux/v5.9-rc4/source/drivers/net/ethernet/mellanox/mlx4/en_tx.c#L903 He is removing an assignment to ring_cons much later in the function and therefore has no effect on this line. > 1. Your patch causes a degradation to the case when MLX4_EN_PERF_STAT > is defined. This is not true, see above.