From patchwork Mon Jan 7 22:10:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: York Sun X-Patchwork-Id: 210255 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 7C0132C0086 for ; Tue, 8 Jan 2013 09:26:04 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 737E04A09B; Mon, 7 Jan 2013 23:26:00 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y4yewjV+ahDW; Mon, 7 Jan 2013 23:26:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE4204A09D; Mon, 7 Jan 2013 23:25:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C23384A09D for ; Mon, 7 Jan 2013 23:25:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 91GqsIUHYZH0 for ; Mon, 7 Jan 2013 23:25:55 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) by theia.denx.de (Postfix) with ESMTPS id 60A904A09B for ; Mon, 7 Jan 2013 23:25:54 +0100 (CET) Received: from mail107-tx2-R.bigfish.com (10.9.14.242) by TX2EHSOBE007.bigfish.com (10.9.40.27) with Microsoft SMTP Server id 14.1.225.23; Mon, 7 Jan 2013 22:10:48 +0000 Received: from mail107-tx2 (localhost [127.0.0.1]) by mail107-tx2-R.bigfish.com (Postfix) with ESMTP id 5B64D4C0140 for ; Mon, 7 Jan 2013 22:10:48 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail107-tx2 (localhost.localdomain [127.0.0.1]) by mail107-tx2 (MessageSwitch) id 1357596646526625_464; Mon, 7 Jan 2013 22:10:46 +0000 (UTC) Received: from TX2EHSMHS017.bigfish.com (unknown [10.9.14.238]) by mail107-tx2.bigfish.com (Postfix) with ESMTP id 655153E004A for ; Mon, 7 Jan 2013 22:10:46 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS017.bigfish.com (10.9.99.117) with Microsoft SMTP Server (TLS) id 14.1.225.23; Mon, 7 Jan 2013 22:10:42 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.2.318.3; Mon, 7 Jan 2013 22:10:42 +0000 Received: from oslab-l1.am.freescale.net ([10.214.80.232]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r07MAeqa003735; Mon, 7 Jan 2013 15:10:40 -0700 From: York Sun To: Date: Mon, 7 Jan 2013 14:10:28 -0800 Message-ID: <1357596628-27501-1-git-send-email-yorksun@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: scottwood@freescale.com, afleming@freescale.com, York Sun Subject: [U-Boot] [PATCH] Introduce a global bool type X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 'bool' is defined in random places. This patch consolidates them into a single typedef. Signed-off-by: York Sun --- 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