LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Yunsheng Lin <linyunsheng@huawei.com>
To: Colin King <colin.king@canonical.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	Salil Mehta <salil.mehta@huawei.com>,
	"David S . Miller" <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net: hns3: remove redundant assignment of l2_hdr to itself
Date: Wed, 8 May 2019 20:13:17 +0800	[thread overview]
Message-ID: <e4627235-16a8-60be-4e7b-0a7e36df55c9@huawei.com> (raw)
In-Reply-To: <20190508105135.13170-1-colin.king@canonical.com>

On 2019/5/8 18:51, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer l2_hdr is being assigned to itself, this is redundant
> and can be removed.
> 
> Addresses-Coverity: ("Evaluation order violation")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> index 18711e0f9bdf..196a3d780dcf 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
> @@ -810,7 +810,7 @@ static int hns3_set_l2l3l4(struct sk_buff *skb, u8 ol4_proto,
>  			   u8 il4_proto, u32 *type_cs_vlan_tso,
>  			   u32 *ol_type_vlan_len_msec)
>  {
> -	unsigned char *l2_hdr = l2_hdr = skb->data;
> +	unsigned char *l2_hdr = skb->data;

Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com>

Thanks.

>  	u32 l4_proto = ol4_proto;
>  	union l4_hdr_info l4;
>  	union l3_hdr_info l3;
> 


  reply	other threads:[~2019-05-08 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 10:51 Colin King
2019-05-08 12:13 ` Yunsheng Lin [this message]
2019-05-08 16:44 ` David Miller

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=e4627235-16a8-60be-4e7b-0a7e36df55c9@huawei.com \
    --to=linyunsheng@huawei.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    --subject='Re: [PATCH] net: hns3: remove redundant assignment of l2_hdr to itself' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).