Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754238AbdLTGQS (ORCPT ); Wed, 20 Dec 2017 01:16:18 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2704 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751908AbdLTGQR (ORCPT ); Wed, 20 Dec 2017 01:16:17 -0500 Subject: Re: [PATCH V2 net-next 02/17] net: hns3: add support to modify tqps number To: David Miller References: <1513656159-127589-1-git-send-email-lipeng321@huawei.com> <1513656159-127589-3-git-send-email-lipeng321@huawei.com> <20171219.141840.1031328928935244349.davem@davemloft.net> CC: , , , From: "lipeng (Y)" Message-ID: <96a532c2-c557-532f-7bfe-29301977bb5a@huawei.com> Date: Wed, 20 Dec 2017 14:15:51 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20171219.141840.1031328928935244349.davem@davemloft.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.173.108] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 818 Lines: 31 On 2017/12/20 3:18, David Miller wrote: > From: Lipeng > Date: Tue, 19 Dec 2017 12:02:24 +0800 > >> @@ -2651,6 +2651,19 @@ static int hns3_get_ring_config(struct hns3_nic_priv *priv) >> return ret; >> } >> >> +static void hns3_put_ring_config(struct hns3_nic_priv *priv) >> +{ >> + struct hnae3_handle *h = priv->ae_handle; >> + u16 i; >> + >> + for (i = 0; i < h->kinfo.num_tqps; i++) { > Please use a plain "int" for index iteration loops like this since > that is the canonical type to use. will check and fix this , Thanks. >> +static void hclge_release_tqp(struct hclge_vport *vport) >> +{ >> + struct hnae3_knic_private_info *kinfo = &vport->nic.kinfo; >> + struct hclge_dev *hdev = vport->back; >> + u16 i; >> + >> + for (i = 0; i < kinfo->num_tqps; i++) { > Likewise. > > . >