diff mbox series

[v2,3/7] net/vmxnet3: remove 'typedef int bool'

Message ID 20200102174838.12908-4-dharmik.thakkar@arm.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series remove 'typedef int bool' | expand

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch warning coding style issues

Commit Message

Dharmik Thakkar Jan. 2, 2020, 5:48 p.m. UTC
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>
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h  | 6 +++---
 drivers/net/vmxnet3/base/vmxnet3_osdep.h | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Yong Wang Jan. 2, 2020, 7:53 p.m. UTC | #1
-----Original Message-----
From: Dharmik Thakkar <dharmik.thakkar@arm.com>
Date: Thursday, January 2, 2020 at 9:49 AM
To: Yong Wang <yongwang@vmware.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Dharmik Thakkar <dharmik.thakkar@arm.com>
Subject: [PATCH v2 3/7] net/vmxnet3: remove 'typedef int bool'

    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  | 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
diff mbox series

Patch

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)