Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3504791pxf; Mon, 5 Apr 2021 14:03:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpdH7IbtlEvE8pHLJ1LgXHYP959czJr0LtTj3VtaJWPb4ljqzBehnPhWDWKx35JFexbFHX X-Received: by 2002:a92:6810:: with SMTP id d16mr22397771ilc.88.1617656584254; Mon, 05 Apr 2021 14:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617656584; cv=none; d=google.com; s=arc-20160816; b=soiFgoXZ+AlRnu0iBunegO3r51Jza7vJyNMeS5L7cdUPk6+XHZl286svYxSSkABzfB H036FDbFo+IsmKvi9cvQT/Qajs97/xIwEZdr2YhLQdDGpKb+hfdVTPo8Z0ssvCM8qFmU 24WINe0Q39o5eoS6t0n+5mPkBEs6oR75pMvqH4M/giRJVSGrW6Nq2nyR0E4WnBQ4ON1e LbxvK33NLl8htiCJT09/tP9+kXr70HLnoOMGUZ7OhUMRa2KfdYb03KJXGuYoMkcMfq1Z hsLufm9qd1tdyKWKkZVa8aO2KptpmtbYblhGxkE/SKrsYkbKbLxI+T7rjVStpf+MH/Th QWzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=/WQ+6CXax2xcPtJUiYUX/l77SrEsw3INqpo1vYyqwqQ=; b=Or1CqEai/p5+ZZCCcy9dqOaRkO4K26E8ZGlgRlJccSBPEa+pywRMRxgmcRid97NlU7 AtWExnSiZUyytqRH7rcbb+8wZ7kHDL/Qk97L9q3A2mVUK7YEt45/ZY5o/F36v0T+T8wV weyTjgZSR3F9kS0F6ZxXOsbon4a54cQHDGRuYJN+5592pHEwZxC1LbSH20O/byL2Y1I3 +5cfdTnOubZoqGgpudWeWFlKbJ6HTND7xeNru9kRhftNygLRRCA4obYcbG7bJeYXEjTQ 3ZevecXlu8pwzaU0Wxt3dkPSngFIbsnGCy06DrhyyWQuBbLGiMN6YiHs8fWqsXhVy0IA wVzQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si15739564ioi.40.2021.04.05.14.02.50; Mon, 05 Apr 2021 14:03:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235463AbhDEM0r convert rfc822-to-8bit (ORCPT + 99 others); Mon, 5 Apr 2021 08:26:47 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:2757 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232650AbhDEM0q (ORCPT ); Mon, 5 Apr 2021 08:26:46 -0400 Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FDV8Z3zjxz686VG; Mon, 5 Apr 2021 20:19:42 +0800 (CST) Received: from lhreml707-chm.china.huawei.com (10.201.108.56) by fraeml734-chm.china.huawei.com (10.206.15.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Mon, 5 Apr 2021 14:26:38 +0200 Received: from lhreml703-chm.china.huawei.com (10.201.108.52) by lhreml707-chm.china.huawei.com (10.201.108.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Mon, 5 Apr 2021 13:26:37 +0100 Received: from lhreml703-chm.china.huawei.com ([10.201.68.198]) by lhreml703-chm.china.huawei.com ([10.201.68.198]) with mapi id 15.01.2106.013; Mon, 5 Apr 2021 13:26:37 +0100 From: Salil Mehta To: Leon Romanovsky CC: "davem@davemloft.net" , "kuba@kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linuxarm , "linuxarm@openeuler.org" Subject: RE: [PATCH net 1/2] net: hns3: Remove the left over redundant check & assignment Thread-Topic: [PATCH net 1/2] net: hns3: Remove the left over redundant check & assignment Thread-Index: AQHXKCnLHaQ/R/ieO0avXcKs+3D9qaqj1ZcAgAIEzIA= Date: Mon, 5 Apr 2021 12:26:37 +0000 Message-ID: <09176e61b8ca495f8c20b94845d26ba0@huawei.com> References: <20210403013520.22108-1-salil.mehta@huawei.com> <20210403013520.22108-2-salil.mehta@huawei.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.71.226] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leon, Thanks for the review. > From: Leon Romanovsky [mailto:leon@kernel.org] > Sent: Sunday, April 4, 2021 7:26 AM > To: Salil Mehta > Cc: davem@davemloft.net; kuba@kernel.org; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; Linuxarm ; > linuxarm@openeuler.org > Subject: Re: [PATCH net 1/2] net: hns3: Remove the left over redundant check > & assignment > > On Sat, Apr 03, 2021 at 02:35:19AM +0100, Salil Mehta wrote: > > This removes the left over check and assignment which is no longer used > > anywhere in the function and should have been removed as part of the > > below mentioned patch. > > > > Fixes: 012fcb52f67c ("net: hns3: activate reset timer when calling > reset_event") > > Signed-off-by: Salil Mehta > > --- > > drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c > b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c > > index e3f81c7e0ce7..7ad0722383f5 100644 > > --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c > > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c > > @@ -3976,8 +3976,6 @@ static void hclge_reset_event(struct pci_dev *pdev, > struct hnae3_handle *handle) > > * want to make sure we throttle the reset request. Therefore, we will > > * not allow it again before 3*HZ times. > > */ > > - if (!handle) > > - handle = &hdev->vport[0].nic; > > The comment above should be updated too, and probably the signature of > hclge_reset_event() worth to be changed. Yes, true. Both the comment and the prototype will be updated in near future. I can assure you this did not go un-noticed during the change. There are some internal subtleties which I am trying to sort out. Those might come as part of different patch-set which deals with other related changes as well. The current change(and some other) will pave the way for necessary refactoring Of the code being done. > > Thanks > > > > > if (time_before(jiffies, (hdev->last_reset_time + > > HCLGE_RESET_INTERVAL))) { > > -- > > 2.17.1 > >