net/vmxnet3: remove local bool type
authorDharmik Thakkar <dharmik.thakkar@arm.com>
Fri, 10 Jan 2020 20:51:48 +0000 (14:51 -0600)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:02 +0000 (19:46 +0100)
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@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Yong Wang <yongwang@vmware.com>
drivers/net/vmxnet3/base/vmxnet3_defs.h
drivers/net/vmxnet3/base/vmxnet3_osdep.h

index 296d7e5..8d62b3e 100644 (file)
@@ -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;
 }
index c9b92b0..381a68d 100644 (file)
@@ -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)