Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1670530pxf; Fri, 2 Apr 2021 18:39:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXNrWgEaAfPbLM4T73QXrbvn77JEom5Gc8cindvTlE7bPZutG3seI/evgStjhMGMDMW7Zm X-Received: by 2002:a50:fe08:: with SMTP id f8mr18318148edt.217.1617413985697; Fri, 02 Apr 2021 18:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617413985; cv=none; d=google.com; s=arc-20160816; b=zZMkqN70qxnuzCAVf5JtpxIA3v6b/M3l4ktL58dgYEgcr7f4jBDzYky0O2TRmXWb5c aQiSf3rdsR8lUwJjC/5o7kF2lNbu5JrE556EZ9mJBlnE86t6hdIqV/e1uC3AaR5xj2Bm oVLg4YAbsi5a02wo6s5m812N7hxCSuy8zViTZh4a36azWDQ382tgZlejV74iwAvkdZhO DL/f3LMr2JJg7/Ydsfqrzw1XIsC1IUfw6DDySsWkiaNr/34gQJth1pby3nNh+yB5wwv+ ZqojXqLEq2N+l+w5A5ytF8ZNGuSXk+PFJw/in7aFbahmb/HAXff/YXrmGVWjGkStRvcT 0C3w== 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=U5ToLKwV9UtpEwk8EMYAwCRTdrL7qIPFGzviFvVcRrs=; b=k+vI5HGcnQv18/B/Bu7Mkyzp9B02bFKxR7iJPSpdPDERkPlLxQ8YnTw4jnvU5HJOgL TofZU7TlDlvjNo+R3T6sOesVBcZ0sY1HO+1F77UISXsrpQI9DbZhohf2sLHcQqCl+dJ/ ggXf1ZaVF7Su24lwFsU2r0fkFaD7iT3q96SeGivujhTEmbTDIQjaH23a/IW+lhTOBcXo BkF4fDjDvUIBDkDHon1F9l9DY5vOyK5SilqTwOb2D8exS2TQzOfiDNW79Nx+KpUzqcny GrmHHP3eURWn4VJupXtNV8g8xCMP/+wUfSlmNdYCTb7K53nozb0ECE7se3v7k2+zQ7xm xtgQ== 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 q20si8669099ejb.289.2021.04.02.18.39.23; Fri, 02 Apr 2021 18:39:45 -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 S236284AbhDCBgn (ORCPT + 99 others); Fri, 2 Apr 2021 21:36:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:15471 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235990AbhDCBgl (ORCPT ); Fri, 2 Apr 2021 21:36:41 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FBzx15RhvzyN3l; Sat, 3 Apr 2021 09:34:29 +0800 (CST) Received: from A190218597.china.huawei.com (10.47.74.55) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Sat, 3 Apr 2021 09:36:30 +0800 From: Salil Mehta To: , CC: , , , , Subject: [PATCH net 2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event() Date: Sat, 3 Apr 2021 02:35:20 +0100 Message-ID: <20210403013520.22108-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20210403013520.22108-1-salil.mehta@huawei.com> References: <20210403013520.22108-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.47.74.55] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Code to defer the reset(which caps the frequency of the reset) schedules the timer and returns. Hence, following 'else-if' looks un-necessary. Fixes: 9de0b86f6444 ("net: hns3: Prevent to request reset frequently") Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 7ad0722383f5..2ed464e13d1b 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3981,7 +3981,9 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle) HCLGE_RESET_INTERVAL))) { mod_timer(&hdev->reset_timer, jiffies + HCLGE_RESET_INTERVAL); return; - } else if (hdev->default_reset_request) { + } + + if (hdev->default_reset_request) { hdev->reset_level = hclge_get_reset_level(ae_dev, &hdev->default_reset_request); -- 2.17.1