mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <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()
Date: Sun, 13 Sep 2020 14:33:08 -0700 (PDT)	[thread overview]
Message-ID: <20200913.143308.2042080994542358655.davem@davemloft.net> (raw)
In-Reply-To: <c0987225-0079-617a-bf89-b672b07f298a@gmail.com>

From: Tariq Toukan <ttoukan.linux@gmail.com>
Date: Sun, 13 Sep 2020 13:12:05 +0300

> 
> 
> On 9/13/2020 4:22 AM, David Miller wrote:
>> From: Luo Jiaxing <luojiaxing@huawei.com>
>> 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 <luojiaxing@huawei.com>
>> 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.

  reply	other threads:[~2020-09-13 21:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-12  8:08 Luo Jiaxing
2020-09-13  1:22 ` David Miller
2020-09-13 10:12   ` Tariq Toukan
2020-09-13 21:33     ` David Miller [this message]
2020-09-14 20:02     ` Jakub Kicinski
2020-09-15 12:06       ` Tariq Toukan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200913.143308.2042080994542358655.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=idos@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=luojiaxing@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=ttoukan.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®