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 9D200A04F3; Fri, 3 Jan 2020 02:34:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F3FC21C1EA; Fri, 3 Jan 2020 02:34:41 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 80ACB1C1E9 for ; Fri, 3 Jan 2020 02:34:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jan 2020 17:34:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,388,1571727600"; d="scan'208";a="369470596" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 02 Jan 2020 17:34:39 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 2 Jan 2020 17:34:38 -0800 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 2 Jan 2020 17:34:38 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 2 Jan 2020 17:34:37 -0800 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.139]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.203]) with mapi id 14.03.0439.000; Fri, 3 Jan 2020 09:34:36 +0800 From: "Wang, Xiao W" To: Dharmik Thakkar , "Zhang, Qi Z" CC: "dev@dpdk.org" Thread-Topic: [PATCH v2 6/7] net/fm10k: remove 'typedef int bool' Thread-Index: AQHVwZT6rKDxQiu4t0q16rFghyPGBafYKJgA Date: Fri, 3 Jan 2020 01:34:36 +0000 Message-ID: References: <20191003224419.23968-1-dharmik.thakkar@arm.com> <20200102174838.12908-1-dharmik.thakkar@arm.com> <20200102174838.12908-7-dharmik.thakkar@arm.com> In-Reply-To: <20200102174838.12908-7-dharmik.thakkar@arm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 6/7] net/fm10k: 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" Hi, > -----Original Message----- > From: Dharmik Thakkar > Sent: Friday, January 3, 2020 1:49 AM > To: Zhang, Qi Z ; Wang, Xiao W > > Cc: dev@dpdk.org; Dharmik Thakkar > Subject: [PATCH v2 6/7] net/fm10k: remove 'typedef int bool' >=20 > Replace 'typedef int bool' with 'stdbool.h' to avoid possible > multiple definitions of 'bool'. >=20 > Signed-off-by: Dharmik Thakkar > Reviewed-by: Phil Yang > Reviewed-by: Ruifeng Wang > --- > drivers/net/fm10k/base/fm10k_osdep.h | 8 +------- > drivers/net/fm10k/fm10k_ethdev.c | 6 +++--- > 2 files changed, 4 insertions(+), 10 deletions(-) >=20 > diff --git a/drivers/net/fm10k/base/fm10k_osdep.h > b/drivers/net/fm10k/base/fm10k_osdep.h > index 3b6298010da5..019fba5e2534 100644 > --- a/drivers/net/fm10k/base/fm10k_osdep.h > +++ b/drivers/net/fm10k/base/fm10k_osdep.h > @@ -6,6 +6,7 @@ > #define _FM10K_OSDEP_H_ >=20 > #include > +#include > #include > #include > #include > @@ -32,12 +33,6 @@ >=20 > #define FALSE 0 > #define TRUE 1 > -#ifndef false > -#define false FALSE > -#endif > -#ifndef true > -#define true TRUE > -#endif >=20 > typedef uint8_t u8; > typedef int8_t s8; > @@ -47,7 +42,6 @@ typedef uint32_t u32; > typedef int32_t s32; > typedef int64_t s64; > typedef uint64_t u64; > -typedef int bool; >=20 > #ifndef __le16 > #define __le16 u16 > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > b/drivers/net/fm10k/fm10k_ethdev.c > index 407baa16c364..581c690b1842 100644 > --- a/drivers/net/fm10k/fm10k_ethdev.c > +++ b/drivers/net/fm10k/fm10k_ethdev.c > @@ -3210,19 +3210,19 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev) >=20 > /* Make sure Switch Manager is ready before going forward. */ > if (hw->mac.type =3D=3D fm10k_mac_pf) { > - int switch_ready =3D 0; > + bool switch_ready =3D false; >=20 > for (i =3D 0; i < MAX_QUERY_SWITCH_STATE_TIMES; i++) { > fm10k_mbx_lock(hw); > hw->mac.ops.get_host_state(hw, &switch_ready); > fm10k_mbx_unlock(hw); > - if (switch_ready) > + if (switch_ready =3D=3D true) > break; > /* Delay some time to acquire async LPORT_MAP info. > */ > rte_delay_us(WAIT_SWITCH_MSG_US); > } >=20 > - if (switch_ready =3D=3D 0) { > + if (switch_ready =3D=3D false) { > PMD_INIT_LOG(ERR, "switch is not ready"); > return -1; > } > -- > 2.17.1 Acked-by: Xiao Wang BRs, Xiao