From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D78D45B9C; Tue, 22 Oct 2024 08:32:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1F96402A3; Tue, 22 Oct 2024 08:32:07 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 204094021F for ; Tue, 22 Oct 2024 08:32:06 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4XXj4K33tCzQrSl; Tue, 22 Oct 2024 14:31:13 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 19ADB1800DB; Tue, 22 Oct 2024 14:32:04 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 22 Oct 2024 14:32:03 +0800 Message-ID: <265ce8f4-1681-4059-afa1-5e475f6a1c22@huawei.com> Date: Tue, 22 Oct 2024 14:32:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] net/hns3: fix variable type To: Jie Hai , , , , Yisen Zhuang CC: , References: <20241021020040.24805-1-haijie1@huawei.com> <20241022040113.2746-1-haijie1@huawei.com> <20241022040113.2746-2-haijie1@huawei.com> Content-Language: en-US From: fengchengwen In-Reply-To: <20241022040113.2746-2-haijie1@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Chengwen Feng On 2024/10/22 12:01, Jie Hai wrote: > The patch fixes variable type in case of data trunction. > > Fixes: dd4b8bba785f ("net/hns3: support reporting names of registers") > Cc: stable@dpdk.org > > Signed-off-by: Jie Hai > --- > drivers/net/hns3/hns3_regs.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c > index e8bc7fbc66e1..be6929738942 100644 > --- a/drivers/net/hns3/hns3_regs.c > +++ b/drivers/net/hns3/hns3_regs.c > @@ -1178,9 +1178,9 @@ hns3_direct_access_tqp_regs_help(struct hns3_hw *hw, struct rte_dev_reg_info *re > uint32_t modules, enum hns3_reg_modules idx) > { > const struct hns3_dirt_reg_entry *reg_list; > - uint16_t tqp_num, reg_offset; > + uint32_t reg_num, i, j, reg_offset; > uint32_t *data = regs->data; > - uint32_t reg_num, i, j; > + uint16_t tqp_num; > > if ((modules & HNS3_MODULE_MASK(idx)) == 0) > return;