[dpdk-dev] [PATCH v3 3/7] net/vmxnet3: remove 'typedef int bool'

Dharmik Thakkar dharmik.thakkar at arm.com
Fri Jan 10 21:51:48 CET 2020


Replace 'typedef int bool' with 'stdbool.h' to avoid possible
multiple definitions of 'bool'.
Remove 'typedef char Bool' and use 'bool' instead.

Signed-off-by: Dharmik Thakkar <dharmik.thakkar at arm.com>
Reviewed-by: Phil Yang <phil.yang at arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang at arm.com>
Acked-by: Yong Wang <yongwang at vmware.com>
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h  | 6 +++---
 drivers/net/vmxnet3/base/vmxnet3_osdep.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index 296d7e54c330..8d62b3e116e6 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -577,7 +577,7 @@ enum vmxnet3_intr_type {
 typedef
 #include "vmware_pack_begin.h"
 struct Vmxnet3_IntrConf {
-   Bool   autoMask;
+   bool   autoMask;
    uint8  numIntrs;      /* # of interrupts */
    uint8  eventIntrIdx;
    uint8  modLevels[VMXNET3_MAX_INTRS]; /* moderation level for each intr */
@@ -593,7 +593,7 @@ Vmxnet3_IntrConf;
 typedef
 #include "vmware_pack_begin.h"
 struct Vmxnet3_QueueStatus {
-   Bool    stopped;
+   bool    stopped;
    uint8   _pad[3];
    __le32  error;
 }
@@ -613,7 +613,7 @@ Vmxnet3_TxQueueCtrl;
 typedef
 #include "vmware_pack_begin.h"
 struct Vmxnet3_RxQueueCtrl {
-   Bool    updateRxProd;
+   bool    updateRxProd;
    uint8   _pad[7];
    __le64  reserved;
 }
diff --git a/drivers/net/vmxnet3/base/vmxnet3_osdep.h b/drivers/net/vmxnet3/base/vmxnet3_osdep.h
index c9b92b049fe7..381a68db6957 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_osdep.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_osdep.h
@@ -5,12 +5,12 @@
 #ifndef _VMXNET3_OSDEP_H
 #define _VMXNET3_OSDEP_H
 
+#include <stdbool.h>
+
 typedef uint64_t	uint64;
 typedef uint32_t	uint32;
 typedef uint16_t	uint16;
 typedef uint8_t		uint8;
-typedef int		bool;
-typedef char		Bool;
 
 #ifndef UNLIKELY
 #define UNLIKELY(x)  __builtin_expect((x),0)
-- 
2.17.1



More information about the dev mailing list