From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EXDpuUDC1Xy8/F7ecsv1YxFEfgd8xqUhfjNh1qxM4nY=; b=acpocAXNBhG/AmmsFCtqhG+xXRvrPU+DLGmp7B+4SpQKxmeT8xMU7siT9iUFO66wED QO5B3vCOqRxLxVv204BAHgKKCPncv1/iOqWlFNgSWce7AvV8iFCGPda/6pk88yJS9FcT Rg363q0QNKoR80/GLUBooqIoZgrDC0ZHxhM6Uw3oTeIxeGLz1D57LdLJSfRL/nPq4glA haPnGX2PDwxM5oWQHXlAv/gN5r32esj+IcaqArOCWMK/q5xs+A1egxiBgNI+JdjaVXUx R/6bk0hdvTKHIw2jaWddPOPWw9GadbTt23Q9XtucU1k73T8pfEXwFG/kw6TtYuyb98Ph a2nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=EXDpuUDC1Xy8/F7ecsv1YxFEfgd8xqUhfjNh1qxM4nY=; b=hxxj2W1ZEG4g+ojBPeRl4jV/fT7xNSYK6xBKubQBkFQarb+uZItCS5CSw6H2p6L4HA mURVVQK7lnZHeEpoG/7BKyA7RER/680IWLF0CyX8KHMpTdhciw0dwwz7dTGqgQhhaFWP V5XCQMLoppJ4wUEG0fSoUM9HvMQbCavymoabx+LTgVaUYgbfZ05GcxndMgB91qpL7AYb efPaaGdkcYy65ZW9SOJMvuUSeOgNOXLOgcoutT1uWZxVC9DYQEetG11cBczo/L2LeCom DKKTBoIjHEUi5zrdJ6nnCzrqdk+XfHWqrnA5qY73WHvvPp7jU/cdL3Z6w2FGbnXWX1Is 5uNQ== X-Gm-Message-State: AOUpUlHl5ni7RFG0ssy/YPdnp6WyPvUmuuAuc9fPgpYoCvJMre/H2XFk s33rsC/gFvbIdJE+kqIqc4H0UA== X-Google-Smtp-Source: AA+uWPw/QprwajkHKBr7PduSoRgB27+HVXiQeovsmI48Tea68CTorPLyi48+ZXCtGkyjqOZHslNOCQ== X-Received: by 2002:a17:902:9b93:: with SMTP id y19-v6mr46556350plp.113.1534876291407; Tue, 21 Aug 2018 11:31:31 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q75-v6sm4144863pfi.185.2018.08.21.11.31.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Aug 2018 11:31:31 -0700 (PDT) Date: Tue, 21 Aug 2018 11:31:29 -0700 From: Stephen Hemminger To: Matan Azrad Cc: "dev@dpdk.org" , Stephen Hemminger Message-ID: <20180821113129.6e7e680e@xeon-e3> In-Reply-To: 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 Subject: Re: [dpdk-dev] [PATCH 2/2] ethdev: make rte_eth_is_valid_owner_id return bool X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2018 18:31:32 -0000 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.