All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <yorksun@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Introduce a global bool type
Date: Mon, 7 Jan 2013 14:10:28 -0800	[thread overview]
Message-ID: <1357596628-27501-1-git-send-email-yorksun@freescale.com> (raw)

'bool' is defined in random places. This patch consolidates them into a
single typedef.

Signed-off-by: York Sun <yorksun@freescale.com>
---
 arch/blackfin/include/asm/posix_types.h |    3 ---
 board/Marvell/include/core.h            |    5 -----
 drivers/mtd/nand/mxc_nand.c             |    2 --
 drivers/usb/musb-new/linux-compat.h     |    2 --
 include/galileo/core.h                  |    5 -----
 include/linux/types.h                   |    2 ++
 include/xyzModem.h                      |    5 -----
 7 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/arch/blackfin/include/asm/posix_types.h b/arch/blackfin/include/asm/posix_types.h
index 000ffe5..1f28b36 100644
--- a/arch/blackfin/include/asm/posix_types.h
+++ b/arch/blackfin/include/asm/posix_types.h
@@ -61,9 +61,6 @@ typedef unsigned int __kernel_gid32_t;
 typedef unsigned short __kernel_old_uid_t;
 typedef unsigned short __kernel_old_gid_t;
 
-#define BOOL_WAS_DEFINED
-typedef enum { false = 0, true = 1 } bool;
-
 #ifdef __GNUC__
 typedef long long __kernel_loff_t;
 #endif
diff --git a/board/Marvell/include/core.h b/board/Marvell/include/core.h
index c413439..3119d0a 100644
--- a/board/Marvell/include/core.h
+++ b/board/Marvell/include/core.h
@@ -91,11 +91,6 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
 #define _1G		0x40000000
 #define _2G		0x80000000
 
-#ifndef	BOOL_WAS_DEFINED
-#define BOOL_WAS_DEFINED
-typedef enum _bool{false,true} bool;
-#endif
-
 /* Little to Big endian conversion macros */
 
 #ifdef LE /* Little Endian */
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c
index d0ded48..04836c0 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/mxc_nand.c
@@ -29,8 +29,6 @@
 
 #define DRIVER_NAME "mxc_nand"
 
-typedef enum {false, true} bool;
-
 struct mxc_nand_host {
 	struct mtd_info			mtd;
 	struct nand_chip		*nand;
diff --git a/drivers/usb/musb-new/linux-compat.h b/drivers/usb/musb-new/linux-compat.h
index 5c126ef..72c8c2b 100644
--- a/drivers/usb/musb-new/linux-compat.h
+++ b/drivers/usb/musb-new/linux-compat.h
@@ -12,8 +12,6 @@
 #define __iomem
 #define __deprecated
 
-typedef enum { false = 0, true = 1 } bool;
-
 struct unused {};
 typedef struct unused unused_t;
 
diff --git a/include/galileo/core.h b/include/galileo/core.h
index c277509..faf4962 100644
--- a/include/galileo/core.h
+++ b/include/galileo/core.h
@@ -110,11 +110,6 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
 #define _1G             0x40000000
 #define _2G             0x80000000
 
-#ifndef	BOOL_WAS_DEFINED
-#define BOOL_WAS_DEFINED
-typedef enum _bool{false,true} bool;
-#endif
-
 /* Little to Big endian conversion macros */
 
 #ifdef LE /* Little Endian */
diff --git a/include/linux/types.h b/include/linux/types.h
index 1b0b4a4..b359c33 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -113,6 +113,8 @@ typedef		__u64		u_int64_t;
 typedef		__s64		int64_t;
 #endif
 
+typedef _Bool bool;
+
 #endif /* __KERNEL_STRICT_NAMES */
 
 /*
diff --git a/include/xyzModem.h b/include/xyzModem.h
index f437bbd..9723e73 100644
--- a/include/xyzModem.h
+++ b/include/xyzModem.h
@@ -97,11 +97,6 @@ typedef struct {
 #endif
 } connection_info_t;
 
-#ifndef	BOOL_WAS_DEFINED
-#define BOOL_WAS_DEFINED
-typedef unsigned int bool;
-#endif
-
 #define false 0
 #define true 1
 
-- 
1.7.9.5

             reply	other threads:[~2013-01-07 22:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-07 22:10 York Sun [this message]
2013-01-07 22:29 ` [U-Boot] [PATCH] Introduce a global bool type Scott Wood
2013-01-07 22:32 ` [U-Boot] [u-boot-release] " Timur Tabi
2013-01-07 22:39 ` [U-Boot] " Wolfgang Denk
2013-01-07 22:50   ` Scott Wood
2013-01-07 22:54   ` Måns Rullgård
2013-01-08  6:25     ` Wolfgang Denk
2013-01-08 16:51   ` Tabi Timur-B04825
2013-01-08 17:49     ` Wolfgang Denk
2013-01-08 17:53       ` Timur Tabi
2013-01-08 19:07         ` Wolfgang Denk
2013-01-08 19:09           ` Timur Tabi
2013-01-08 19:56           ` York Sun
2013-01-08 21:39             ` Wolfgang Denk
2013-01-08 21:43               ` York Sun
2013-01-08 21:46                 ` Scott Wood
2013-01-19  9:30           ` Albert ARIBAUD
2013-01-21 18:05             ` Scott Wood
2013-01-21 22:36               ` Måns Rullgård
2013-01-21 22:51                 ` Scott Wood
2013-01-21 23:08                   ` Måns Rullgård
2013-01-22  7:41                     ` Albert ARIBAUD
2013-01-22 12:59                       ` Måns Rullgård
2013-01-08 18:34       ` Bernhard Walle
2013-01-08 19:08         ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357596628-27501-1-git-send-email-yorksun@freescale.com \
    --to=yorksun@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.