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 5B0C9A0A02; Sat, 17 Apr 2021 09:40:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47F55161E89; Sat, 17 Apr 2021 09:40:01 +0200 (CEST) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id E089440143 for ; Sat, 17 Apr 2021 09:39:59 +0200 (CEST) Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4FMlKb5fRzzyPG2; Sat, 17 Apr 2021 15:37:39 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Sat, 17 Apr 2021 15:39:55 +0800 To: Thomas Monjalon , , CC: , References: <1618046334-39857-1-git-send-email-humin29@huawei.com> <1618570839-3761-1-git-send-email-humin29@huawei.com> <2407731.DT0DZfuyaB@thomas> From: "Min Hu (Connor)" Message-ID: Date: Sat, 17 Apr 2021 15:39:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <2407731.DT0DZfuyaB@thomas> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v7] ethdev: add sanity checks in control APIs 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 Sender: "dev" ÔÚ 2021/4/16 20:02, Thomas Monjalon дµÀ: > 16/04/2021 13:00, Min Hu (Connor): >> + if (iter == NULL) { >> + RTE_ETHDEV_LOG(ERR, "Cannot init iterator for NULL iterator\n"); > > Don't you think it would be better as > "Cannot init NULL iterator"? > >> rte_eth_iterator_cleanup(struct rte_dev_iterator *iter) >> { >> + if (iter == NULL) { >> + RTE_ETHDEV_LOG(ERR, "Cannot iterator clear up for NULL iter\n"); > > Cannot clean up NULL iterator. > >> rte_eth_dev_owner_new(uint64_t *owner_id) >> { >> + if (owner_id == NULL) { >> + RTE_ETHDEV_LOG(ERR, "Cannot get owner id for NULL param\n"); > > Cannot return owner id. > >> @@ -825,6 +864,11 @@ rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id) >> + if (port_id == NULL) { >> + RTE_ETHDEV_LOG(ERR, "Cannot get port id for NULL param\n"); > > Cannot return port ID > > etc for all other messages > > Do you agree with the idea? > Hi£¬ Thomos, fixed in v10, thanks. > > . >