From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH 2/2] ethdev: make rte_eth_is_valid_owner_id return bool Date: Tue, 21 Aug 2018 11:31:29 -0700 Message-ID: <20180821113129.6e7e680e@xeon-e3> References: <20180814001926.19630-1-stephen@networkplumber.org> <20180816224409.5719-1-stephen@networkplumber.org> <20180816224409.5719-3-stephen@networkplumber.org> <20180821080644.306bba69@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" , Stephen Hemminger To: Matan Azrad Return-path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id 524653DC for ; Tue, 21 Aug 2018 20:31:32 +0200 (CEST) Received: by mail-pl0-f68.google.com with SMTP id b90-v6so9187482plb.0 for ; Tue, 21 Aug 2018 11:31:32 -0700 (PDT) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 21 Aug 2018 15:48:19 +0000 Matan Azrad wrote: > Hi > > From: Stephen Hemminger > > On Tue, 21 Aug 2018 10:20:43 +0000 > > Matan Azrad wrote: > > > > > From: Stephen Hemminger > > > > Function is boolean so use that. > > > > > > Ethdev is not using bool type, see also: > > > rte_eth_dev_is_valid_port > > > rte_eth_dev_is_removed > > > rte_eth_dev_pool_ops_supported > > > > > > I think it should be a full solution to all. > > > > > > > Signed-off-by: Stephen Hemminger > > > > I didn't want change type of visible (exported by ABI) functions. > > > Since ethdev now is not using bool type I think it's better not to change it only for this API. I hate to pick nits but there is already a bool usage in internal function (static) in ethdev. static bool is_allocated(const struct rte_eth_dev *ethdev) { return ethdev->data->name[0] != '\0'; } Using bool functions doesn't really generate different code. It is is more about using modern C conventions.