From: Dharmik Thakkar Date: Fri, 10 Jan 2020 20:51:51 +0000 (-0600) Subject: net/fm10k: remove local bool type X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0f9e90b54fdad20e3ad04c537f1c25345e8c3d6c;p=dpdk.git net/fm10k: remove local bool type 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 Acked-by: Xiao Wang --- diff --git a/drivers/net/fm10k/base/fm10k_osdep.h b/drivers/net/fm10k/base/fm10k_osdep.h index 3b6298010d..019fba5e25 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_ #include +#include #include #include #include @@ -32,12 +33,6 @@ #define FALSE 0 #define TRUE 1 -#ifndef false -#define false FALSE -#endif -#ifndef true -#define true TRUE -#endif 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; #ifndef __le16 #define __le16 u16 diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 407baa16c3..581c690b18 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) /* Make sure Switch Manager is ready before going forward. */ if (hw->mac.type == fm10k_mac_pf) { - int switch_ready = 0; + bool switch_ready = false; for (i = 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 == true) break; /* Delay some time to acquire async LPORT_MAP info. */ rte_delay_us(WAIT_SWITCH_MSG_US); } - if (switch_ready == 0) { + if (switch_ready == false) { PMD_INIT_LOG(ERR, "switch is not ready"); return -1; }