summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2013-04-01 11:29:11 -0700
committerTom Rini <trini@ti.com>2013-04-01 16:33:52 -0400
commit472d546054dadacca91530bad42ad06f6408124e (patch)
tree3acfccea2d15c21f12651a852d31452d33ea98e0 /include
parent5644369450635fa5c2967bee55b1ac41f6e988d0 (diff)
downloadblackbird-obmc-uboot-472d546054dadacca91530bad42ad06f6408124e.tar.gz
blackbird-obmc-uboot-472d546054dadacca91530bad42ad06f6408124e.zip
Consolidate bool type
'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/at91rm9200_net.h4
-rw-r--r--include/bedbug/ppc.h5
-rw-r--r--include/fpga.h8
-rw-r--r--include/galileo/core.h6
-rw-r--r--include/linux/mtd/nand.h2
-rw-r--r--include/linux/types.h1
-rw-r--r--include/linux/usb/gadget.h6
-rw-r--r--include/malloc.h2
-rw-r--r--include/scsi.h8
-rw-r--r--include/sym53c8xx.h7
-rw-r--r--include/usbdevice.h4
-rw-r--r--include/xyzModem.h8
12 files changed, 9 insertions, 52 deletions
diff --git a/include/at91rm9200_net.h b/include/at91rm9200_net.h
index f799206e42..804105f584 100644
--- a/include/at91rm9200_net.h
+++ b/include/at91rm9200_net.h
@@ -23,10 +23,6 @@
#include <asm/io.h>
#include <asm/arch/hardware.h>
-#define FALSE 0
-#define TRUE 1
-
-
#define ETHERNET_ADDRESS_SIZE 6
typedef unsigned char UCHAR;
diff --git a/include/bedbug/ppc.h b/include/bedbug/ppc.h
index 46bf8db1a7..76d86fdbf7 100644
--- a/include/bedbug/ppc.h
+++ b/include/bedbug/ppc.h
@@ -296,11 +296,6 @@ struct operand {
((rc) & 0x1))
#define MDS_MASK MDS_OPCODE(0x3f,0xf,0x1)
-#ifndef FALSE
-#define FALSE 0
-#define TRUE (!FALSE)
-#endif
-
#define INSTRUCTION( memaddr ) ntohl(*(unsigned long *)(memaddr))
#define MAX_OPERANDS 8
diff --git a/include/fpga.h b/include/fpga.h
index e0b1fe71a8..30a4e6a2e8 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -31,14 +31,6 @@
#define CONFIG_MAX_FPGA_DEVICES 5
#endif
-/* these probably belong somewhere else */
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (!FALSE)
-#endif
-
/* CONFIG_FPGA bit assignments */
#define CONFIG_SYS_FPGA_MAN(x) (x)
#define CONFIG_SYS_FPGA_DEV(x) ((x) << 8 )
diff --git a/include/galileo/core.h b/include/galileo/core.h
index c277509298..95013fac26 100644
--- a/include/galileo/core.h
+++ b/include/galileo/core.h
@@ -14,6 +14,7 @@ space). The macros take care of Big/Little endian conversions.
/* includes */
#include "gt64260R.h"
+#include <stdbool.h>
extern unsigned int INTERNAL_REG_BASE_ADDR;
@@ -110,11 +111,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/mtd/nand.h b/include/linux/mtd/nand.h
index e9e904523a..98bf255bb2 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -180,7 +180,7 @@ typedef enum {
*/
#define BBT_AUTO_REFRESH 0x00000080
/*
- * Chip does not require ready check on read. True
+ * Chip does not require ready check on read. true
* for all large page devices, as they do not support
* autoincrement.
*/
diff --git a/include/linux/types.h b/include/linux/types.h
index 1b0b4a44c4..f07ba41b72 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -7,6 +7,7 @@
#include <linux/posix_types.h>
#include <asm/types.h>
+#include <stdbool.h>
#ifndef __KERNEL_STRICT_NAMES
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index eba865ea09..220d068600 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -421,11 +421,11 @@ struct device {
* driver setup() requests
* @ep_list: List of other endpoints supported by the device.
* @speed: Speed of current connection to USB host.
- * @is_dualspeed: True if the controller supports both high and full speed
+ * @is_dualspeed: true if the controller supports both high and full speed
* operation. If it does, the gadget driver must also support both.
- * @is_otg: True if the USB device port uses a Mini-AB jack, so that the
+ * @is_otg: true if the USB device port uses a Mini-AB jack, so that the
* gadget driver must provide a USB OTG descriptor.
- * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable
+ * @is_a_peripheral: false unless is_otg, the "A" end of a USB cable
* is in the Mini-AB jack, and HNP has been used to switch roles
* so that the "A" device currently acts as A-Peripheral, not A-Host.
* @a_hnp_support: OTG device feature flag, indicating that the A-Host
diff --git a/include/malloc.h b/include/malloc.h
index 6295929ea3..c33f3b494e 100644
--- a/include/malloc.h
+++ b/include/malloc.h
@@ -196,7 +196,7 @@
MORECORE_FAILURE (default: -1)
The value returned upon failure of MORECORE.
MORECORE_CLEARS (default 1)
- True (1) if the routine mapped to MORECORE zeroes out memory (which
+ true (1) if the routine mapped to MORECORE zeroes out memory (which
holds for sbrk).
DEFAULT_TRIM_THRESHOLD
DEFAULT_TOP_PAD
diff --git a/include/scsi.h b/include/scsi.h
index 9da764bdcf..c764e159fe 100644
--- a/include/scsi.h
+++ b/include/scsi.h
@@ -204,12 +204,4 @@ int scsi_get_disk_count(void);
#define SCSI_INT_STATE 0x00010000 /* unknown Interrupt number is stored in 16 LSB */
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#endif /* _SCSI_H */
diff --git a/include/sym53c8xx.h b/include/sym53c8xx.h
index 7d3ded5fe8..9696db073c 100644
--- a/include/sym53c8xx.h
+++ b/include/sym53c8xx.h
@@ -568,11 +568,4 @@
#define SCSI_IDENTIFY 0xC0
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
#endif
diff --git a/include/usbdevice.h b/include/usbdevice.h
index 7037efd33e..265ba4acd5 100644
--- a/include/usbdevice.h
+++ b/include/usbdevice.h
@@ -676,8 +676,8 @@ struct usb_device_descriptor *usbd_device_device_descriptor(struct
#if defined(CONFIG_USBD_HS)
/*
* is_usbd_high_speed routine needs to be defined by specific gadget driver
- * It returns TRUE if device enumerates at High speed
- * Retuns FALSE otherwise
+ * It returns true if device enumerates at High speed
+ * Retuns false otherwise
*/
int is_usbd_high_speed(void);
#endif
diff --git a/include/xyzModem.h b/include/xyzModem.h
index f437bbd0bd..a3ea768094 100644
--- a/include/xyzModem.h
+++ b/include/xyzModem.h
@@ -97,14 +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
-
#endif
OpenPOWER on IntegriCloud