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 CC65143BDB; Mon, 26 Feb 2024 03:33:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E2E742D89; Mon, 26 Feb 2024 03:33:50 +0100 (CET) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id 9D51F40271 for ; Mon, 26 Feb 2024 03:33:48 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Tjl462nsyz2BdbG; Mon, 26 Feb 2024 10:31:34 +0800 (CST) Received: from kwepemd100004.china.huawei.com (unknown [7.221.188.31]) by mail.maildlp.com (Postfix) with ESMTPS id 5653614011A; Mon, 26 Feb 2024 10:33:47 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.2.1258.28; Mon, 26 Feb 2024 10:33:46 +0800 Message-ID: Date: Mon, 26 Feb 2024 10:33:46 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 1/7] ethdev: support report register names and filter To: Stephen Hemminger CC: , , , , , References: <20231214015650.3738578-1-haijie1@huawei.com> <20240220105823.570841-1-haijie1@huawei.com> <20240220105823.570841-2-haijie1@huawei.com> <20240220071446.6eea0168@hermes.local> From: Jie Hai In-Reply-To: <20240220071446.6eea0168@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemd100004.china.huawei.com (7.221.188.31) 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 On 2024/2/20 23:14, Stephen Hemminger wrote: > On Tue, 20 Feb 2024 18:58:17 +0800 > Jie Hai wrote: > >> int >> rte_eth_dev_get_reg_info(uint16_t port_id, struct rte_dev_reg_info *info) >> +{ >> + struct rte_dev_reg_info reg_info = { 0 }; >> + int ret; >> + >> + if (info == NULL) { >> + RTE_ETHDEV_LOG_LINE(ERR, >> + "Cannot get ethdev port %u register info to NULL", >> + port_id); >> + return -EINVAL; >> + } >> + >> + reg_info.length = info->length; >> + reg_info.data = info->data; >> + reg_info.names = NULL; >> + reg_info.filter = NULL; > > Those NULL assignments are unnecessary, already initialized structure. > . Hi, Stephen, Thanks for your review. Will fix in V4. Best Regards, Jie Hai