From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5E358A04F9; Fri, 10 Jan 2020 21:52:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F7C01EBA4; Fri, 10 Jan 2020 21:52:13 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 1F6A71EB9D for ; Fri, 10 Jan 2020 21:52:09 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 729C71063; Fri, 10 Jan 2020 12:52:09 -0800 (PST) Received: from 2p2660v4-1.austin.arm.com (2p2660v4-1.austin.arm.com [10.118.12.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6C71B3F534; Fri, 10 Jan 2020 12:52:09 -0800 (PST) From: Dharmik Thakkar To: Rahul Lakkireddy Cc: dev@dpdk.org, nd@arm.com, Dharmik Thakkar Date: Fri, 10 Jan 2020 14:51:47 -0600 Message-Id: <20200110205152.30966-3-dharmik.thakkar@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200110205152.30966-1-dharmik.thakkar@arm.com> References: <20200102174838.12908-1-dharmik.thakkar@arm.com> <20200110205152.30966-1-dharmik.thakkar@arm.com> Subject: [dpdk-dev] [PATCH v3 2/7] net/cxgbe: remove 'typedef int 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Replace 'typedef int bool' with 'stdbool.h' to avoid possible multiple definitions of 'bool'. Signed-off-by: Dharmik Thakkar Reviewed-by: Phil Yang Reviewed-by: Ruifeng Wang --- drivers/net/cxgbe/cxgbe_compat.h | 4 +--- drivers/net/cxgbe/cxgbe_main.c | 13 +++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/net/cxgbe/cxgbe_compat.h b/drivers/net/cxgbe/cxgbe_compat.h index 20e4f8af20ee..83ae1c2e5a83 100644 --- a/drivers/net/cxgbe/cxgbe_compat.h +++ b/drivers/net/cxgbe/cxgbe_compat.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -86,7 +87,6 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; -typedef int bool; typedef uint64_t dma_addr_t; #ifndef __le16 @@ -122,8 +122,6 @@ typedef uint64_t dma_addr_t; #define FALSE 0 #define TRUE 1 -#define false 0 -#define true 1 #ifndef min #define min(a, b) RTE_MIN(a, b) diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c index cc5f4df3acbf..0d0827c0e159 100644 --- a/drivers/net/cxgbe/cxgbe_main.c +++ b/drivers/net/cxgbe/cxgbe_main.c @@ -709,11 +709,12 @@ static int cxgbe_get_devargs(struct rte_devargs *devargs, const char *key, return ret; } -static void cxgbe_get_devargs_int(struct adapter *adap, int *dst, - const char *key, int default_value) +static void cxgbe_get_devargs_int(struct adapter *adap, bool *dst, + const char *key, bool default_value) { struct rte_pci_device *pdev = adap->pdev; - int ret, devarg_value = default_value; + int ret; + bool devarg_value = default_value; *dst = default_value; if (!pdev) @@ -729,11 +730,11 @@ static void cxgbe_get_devargs_int(struct adapter *adap, int *dst, void cxgbe_process_devargs(struct adapter *adap) { cxgbe_get_devargs_int(adap, &adap->devargs.keep_ovlan, - CXGBE_DEVARG_CMN_KEEP_OVLAN, 0); + CXGBE_DEVARG_CMN_KEEP_OVLAN, false); cxgbe_get_devargs_int(adap, &adap->devargs.tx_mode_latency, - CXGBE_DEVARG_CMN_TX_MODE_LATENCY, 0); + CXGBE_DEVARG_CMN_TX_MODE_LATENCY, false); cxgbe_get_devargs_int(adap, &adap->devargs.force_link_up, - CXGBE_DEVARG_VF_FORCE_LINK_UP, 0); + CXGBE_DEVARG_VF_FORCE_LINK_UP, false); } static void configure_vlan_types(struct adapter *adapter) -- 2.17.1