lkml.org 
[lkml]   [2020]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit()
    From
    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.

    \
     
     \ /
      Last update: 2020-09-13 23:34    [W:4.391 / U:0.332 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site