Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1317508yba; Thu, 18 Apr 2019 20:09:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFG7n6rpUndISO/KHenSH+xtAFMbhTRw+QY4kcllxfPNzTEEGQSvIEGhdb8hb8f+en1z1m X-Received: by 2002:a63:5c53:: with SMTP id n19mr1527387pgm.193.1555643389646; Thu, 18 Apr 2019 20:09:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555643389; cv=none; d=google.com; s=arc-20160816; b=CMOvy0JPxlI21eJXaubkJOHP4Osy1dpiUPotCYru96Z08zCs0/4dNYMC7Lxs8vwx0j g7cmPAyzw9YkY3Z0pGl4peu5IBSBmhq1+iNzUkomab2hhy8ZTRdfRUYuVR65w6ajHH54 d0M+rKd9U6bxLWnypZwoDm8MvsLC6HK9C2fH46JXeUtJ6eM+41hZuaTVUxkhNfQjlCP/ Gp8j72jtMWLZgFGNoPblI0g13zgl6gxcP4uoXdSzrMy3pnJfAQjmjSyMnUip5xWj9v2n 8US2W/vXe5iQNMyNJl1/EaADHmtFJh2HXtgijJj2zRBzcLKg857ynpHs6d/o/yRY8+Ls oFdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=RB4G9iJZzDMRCtxFsyfqp49sZmAJ9peRoW6C9ZPIDY8=; b=NDcCW3RZmfK960MeliA5lNEgYaCgN5nLEqXr8taWBE3YoKlUpkh1yBp3ILSZZUC03V hIXVgp2FdoXzcYT8jLtKaCepj1dwP1o33QTseoBAHW2rcKsgy2rjh5UE36ttJHBXbItJ OKG7aHCLUjN0euffi8D9n6VJ4jWvZIBsFz4/JN3pfXMPBh4Bs2Fti9eZCoxBvbzK1v7h VX7t1WK32VrbHptkRM+Sc1gGmJjpHo188yRx2Zc5KvEj4CtFfSTvVMSoICHlvbwU7tEA Pg/WHsGryvQhLZR1cUrOCVRizG+12gEsUpRoOi9a6q2u7m17WKzollr9huTGQZrtHE/J AC7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si2964656pgk.459.2019.04.18.20.09.34; Thu, 18 Apr 2019 20:09:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727378AbfDSDHP (ORCPT + 99 others); Thu, 18 Apr 2019 23:07:15 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:53340 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727316AbfDSDHL (ORCPT ); Thu, 18 Apr 2019 23:07:11 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CB0012B9F510CB75F100; Fri, 19 Apr 2019 11:07:09 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.408.0; Fri, 19 Apr 2019 11:06:59 +0800 From: Huazhong Tan To: CC: , , , , , , Jian Shen , Peng Li , Huazhong Tan Subject: [PATCH net-next 06/12] net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info() Date: Fri, 19 Apr 2019 11:05:41 +0800 Message-ID: <1555643147-52407-7-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1555643147-52407-1-git-send-email-tanhuazhong@huawei.com> References: <1555643147-52407-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian Shen In function hns3_get_tx_timeo_queue_info(), it should use netdev->num_tx_queues, instead of netdve->real_num_tx_queues as the loop limitation. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan --- 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 193994c..652b19d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1634,7 +1634,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) int i; /* Find the stopped queue the same way the stack does */ - for (i = 0; i < ndev->real_num_tx_queues; i++) { + for (i = 0; i < ndev->num_tx_queues; i++) { struct netdev_queue *q; unsigned long trans_start; -- 2.7.4