From patchwork Mon Apr 5 17:06:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 415301 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3840683jai; Mon, 5 Apr 2021 10:08:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV3RmBFA4ozT+edMSzl3OQUGBIprWNzJniSfnE2meJIezHZK6OU6Fy7kmNS+a8NYDJL7hS X-Received: by 2002:a05:6638:343:: with SMTP id x3mr24969967jap.44.1617642500992; Mon, 05 Apr 2021 10:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617642500; cv=none; d=google.com; s=arc-20160816; b=Xx21pF0wQeAmk//GhnAFaXPqJabLIK6DJYOl6Pf1VPfqN/WkzdHX0/61OKWJ2B8sAK lSt4JE0v5YDm1hR50ym4UKgH1DVfHMjZYk6Mo3NzbWSFLqVz7rEKALXBVPZszVcCDUM9 WVc1XSxM8tY66OZZFvkbjLqwVFrTe4q9tjCyxZCktoquMZwhxojSDP6g/Cx86ySOWmEi P4obX36uaQfIXgkank/2sYCqjjXfVRwSSHCYrwRYVG5rtWIgx7bDw7hNhlcu3ysg1glP wjqzYtgTR7qtrzMI0Z+g9ZaStAZkEp2gErPSSTMyvrjqaDj8WOuKP5zWNX/LnVBqNXlZ RlGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=4OHSLbDiHHFpjsUv5CxBKco6qfFyu3Lx17DBw8K0O/g=; b=yRr5KEKveBYiOqsb+pTTfkZcSjjG74eRgncryIlWeTnQXkLNpduZHUvya8RoFxY6Zy gAude2Mogd/0c4/VX995NZ5N7cKfXdJXnBWU106YVAJ2cO4jplwQs81iUrAaZs4xJOTH a3gv08Aq/Za0NRODmMWoR1YjuKdAgaZq/ktbFqHgDsjY5Kh4eQUagzY0A2YH+40flsH1 YvWDmOcvc3NKaNvZ50TX5k0fM1EPxk4h4kLMbBkyTDc+tmqXFsZgSwd2LI17b1nsn+8w gqSBjBwfR19xlMeA+1FHd/KG8A/pEy6WFqe7ENkYFkgVFs14K2L+u1/2ejlwg7F5A/Oc nKNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 b6si234517ile.5.2021.04.05.10.08.20; Mon, 05 Apr 2021 10:08:20 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S234196AbhDERIZ (ORCPT + 8 others); Mon, 5 Apr 2021 13:08:25 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:16340 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234028AbhDERIR (ORCPT ); Mon, 5 Apr 2021 13:08:17 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FDcVs145Pz9wtm; Tue, 6 Apr 2021 01:05:57 +0800 (CST) Received: from A190218597.china.huawei.com (10.47.69.183) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.498.0; Tue, 6 Apr 2021 01:08:00 +0800 From: Salil Mehta To: , CC: , , , , Subject: [PATCH V2 net 1/2] net: hns3: Remove the left over redundant check & assignment Date: Mon, 5 Apr 2021 18:06:44 +0100 Message-ID: <20210405170645.29620-2-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20210405170645.29620-1-salil.mehta@huawei.com> References: <20210405170645.29620-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.69.183] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 -- V1->V2: [1] Fixed comments from Leon Romanovsky Link: https://lkml.org/lkml/2021/4/4/14 --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 --- 1 file changed, 3 deletions(-) -- 2.17.1 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index e3f81c7e0ce7..58d210bbb311 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3966,7 +3966,6 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle) * normalcy is to reset. * 2. A new reset request from the stack due to timeout * - * For the first case,error event might not have ae handle available. * check if this is a new reset request and we are not here just because * last reset attempt did not succeed and watchdog hit us again. We will * know this if last reset request did not occur very recently (watchdog @@ -3976,8 +3975,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; if (time_before(jiffies, (hdev->last_reset_time + HCLGE_RESET_INTERVAL))) {