From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EE51C04A6B for ; Wed, 8 May 2019 12:13:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D4C821019 for ; Wed, 8 May 2019 12:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728454AbfEHMNg (ORCPT ); Wed, 8 May 2019 08:13:36 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:56132 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728031AbfEHMNg (ORCPT ); Wed, 8 May 2019 08:13:36 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id DAC28B007655174000B9; Wed, 8 May 2019 20:13:32 +0800 (CST) Received: from [127.0.0.1] (10.74.191.121) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Wed, 8 May 2019 20:13:24 +0800 Subject: Re: [PATCH] net: hns3: remove redundant assignment of l2_hdr to itself To: Colin King , Yisen Zhuang , Salil Mehta , "David S . Miller" , CC: , References: <20190508105135.13170-1-colin.king@canonical.com> From: Yunsheng Lin Message-ID: Date: Wed, 8 May 2019 20:13:17 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20190508105135.13170-1-colin.king@canonical.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.74.191.121] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/5/8 18:51, Colin King wrote: > From: Colin Ian King > > 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 > --- > 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 Thanks. > u32 l4_proto = ol4_proto; > union l4_hdr_info l4; > union l3_hdr_info l3; >