Consolidate bool type
Subsystems (17)
RFC PATCH v5 1/1 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.
---
Change since v1:
Move 'false' and 'true' to the common header file.
Change since v2:
Use stdbool.h
Consolidate all TRUE, FALSE, True, False, true, false
Change since v3:
Fix boolean_t which was missed in v2.
Change since v4:
Replace FALSE, False with false. Replace TRUE, True with true.
This patch doesn't address the white space issue where TRUE/FALSE is repalced.
Need help to test on all ARCHs with differnt toolchains as well as USE_PRIVATE_LIBGCC.
README | 12 +- arch/arm/cpu/arm926ejs/spear/spear600.c | 37 +++-- arch/arm/cpu/arm926ejs/spear/spl_boot.c | 2 +- arch/blackfin/include/asm/posix_types.h | 3 - arch/m68k/lib/interrupts.c | 2 +- arch/nds32/lib/interrupts.c | 2 +- arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 2 +- arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c | 70 +++++---- arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c | 193 ++++++++++++------------ arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c | 15 +- board/Marvell/common/memory.c | 10 +- board/Marvell/db64360/mpsc.c | 2 +- board/Marvell/db64360/mv_eth.h | 7 - board/Marvell/db64460/mpsc.c | 2 +- board/Marvell/db64460/mv_eth.h | 7 - board/Marvell/include/core.h | 5 - board/amcc/bamboo/bamboo.c | 22 +-- board/amcc/bamboo/bamboo.h | 3 - board/amcc/yucca/yucca.c | 3 - board/bf533-ezkit/flash-defines.h | 2 - board/bf533-ezkit/flash.c | 4 +- board/bf533-stamp/video.h | 3 - board/esd/common/lcd.c | 10 +- board/esd/common/lcd.h | 5 - board/esd/cpci750/mpsc.c | 2 +- board/esd/cpci750/mv_eth.h | 7 - board/esd/dasa_sim/cmd_dasa_sim.c | 6 +- board/esd/pmc440/fpga.c | 16 +- board/evb64260/eth_addrtbl.c | 11 +- board/gen860t/fpga.c | 8 +- board/matrix_vision/mvblx/mvblx.c | 2 +- board/mousse/flash.c | 2 +- board/mpl/common/isa.c | 13 +- board/mpl/mip405/mip405.c | 4 +- board/mpl/pip405/pip405.c | 9 +- board/prodrive/p3mx/mpsc.c | 2 +- board/prodrive/p3mx/mv_eth.h | 7 - board/sacsng/clkinit.c | 4 +- board/sacsng/clkinit.h | 5 - board/spear/x600/fpga.c | 8 +- board/teejet/mt_ventoux/mt_ventoux.c | 4 +- board/xilinx/common/xbasic_types.c | 2 +- board/xilinx/common/xbasic_types.h | 8 - board/xilinx/common/xdma_channel.c | 2 +- board/xilinx/common/xdma_channel_sg.c | 4 +- board/xilinx/common/xpacket_fifo_v1_00_b.h | 10 +- board/xilinx/common/xversion.c | 12 +- common/bedbug.c | 68 ++++----- common/cmd_bedbug.c | 4 +- common/cmd_fdc.c | 115 +++++++------- common/cmd_scsi.c | 18 +-- common/dlmalloc.c | 2 +- common/dlmalloc.src | 2 +- drivers/bios_emulator/atibios.c | 8 +- drivers/bios_emulator/include/biosemu.h | 4 +- drivers/bios_emulator/x86emu/debug.c | 2 +- drivers/block/ahci.c | 6 +- drivers/block/sata_dwc.c | 34 ++--- drivers/block/sata_dwc.h | 7 - drivers/block/sym53c8xx.c | 14 +- drivers/fpga/ACEX1K.c | 14 +- drivers/fpga/altera.c | 4 +- drivers/fpga/cyclon2.c | 6 +- drivers/fpga/lattice.c | 4 +- drivers/fpga/spartan2.c | 58 +++---- drivers/fpga/spartan3.c | 60 ++++---- drivers/fpga/virtex2.c | 34 ++--- drivers/fpga/xilinx.c | 4 +- drivers/mtd/nand/mxc_nand.c | 2 - drivers/net/armada100_fec.c | 6 +- drivers/net/armada100_fec.h | 7 - drivers/net/e1000.c | 120 +++++++-------- drivers/net/e1000.h | 55 +++---- drivers/net/e1000_spi.c | 34 ++--- drivers/net/ne2000_base.h | 4 - drivers/net/npe/IxEthAcc.c | 10 +- drivers/net/npe/IxEthAccCommon.c | 26 ++-- drivers/net/npe/IxEthAccDataPlane.c | 16 +- drivers/net/npe/IxEthAccMac.c | 72 ++++----- drivers/net/npe/IxEthDBAPI.c | 26 ++-- drivers/net/npe/IxEthDBAPISupport.c | 42 +++--- drivers/net/npe/IxEthDBCore.c | 8 +- drivers/net/npe/IxEthDBEvents.c | 22 +-- drivers/net/npe/IxEthDBFeatures.c | 24 +-- drivers/net/npe/IxEthDBFirewall.c | 6 +- drivers/net/npe/IxEthDBLearning.c | 4 +- drivers/net/npe/IxEthDBNPEAdaptor.c | 2 +- drivers/net/npe/IxEthDBPortUpdate.c | 22 +-- drivers/net/npe/IxEthDBReports.c | 10 +- drivers/net/npe/IxEthDBSearch.c | 16 +- drivers/net/npe/IxEthDBSpanningTree.c | 2 +- drivers/net/npe/IxEthDBUtil.c | 6 +- drivers/net/npe/IxEthDBVlan.c | 8 +- drivers/net/npe/IxEthMii.c | 24 +-- drivers/net/npe/IxFeatureCtrl.c | 18 +-- drivers/net/npe/IxNpeDl.c | 26 ++-- drivers/net/npe/IxNpeDlImageMgr.c | 16 +- drivers/net/npe/IxNpeDlNpeMgr.c | 10 +- drivers/net/npe/IxNpeMh.c | 6 +- drivers/net/npe/IxNpeMhConfig.c | 6 +- drivers/net/npe/IxNpeMhSend.c | 2 +- drivers/net/npe/IxOsalOsSemaphore.c | 4 +- drivers/net/npe/IxQMgrDispatcher.c | 24 +-- drivers/net/npe/IxQMgrInit.c | 6 +- drivers/net/npe/IxQMgrQCfg.c | 32 ++-- drivers/net/npe/include/IxAtmdAccCtrl.h | 6 +- drivers/net/npe/include/IxEthAcc_p.h | 4 +- drivers/net/npe/include/IxEthDB.h | 28 ++-- drivers/net/npe/include/IxEthDB_p.h | 38 ++--- drivers/net/npe/include/IxEthMii.h | 16 +- drivers/net/npe/include/IxFeatureCtrl.h | 6 +- drivers/net/npe/include/IxHssAcc.h | 14 +- drivers/net/npe/include/IxNpeDl.h | 2 +- drivers/net/npe/include/IxNpeDlNpeMgrUtils_p.h | 16 +- drivers/net/npe/include/IxNpeDlNpeMgr_p.h | 2 +- drivers/net/npe/include/IxNpeMhConfig_p.h | 16 +- drivers/net/npe/include/IxOsal.h | 12 +- drivers/net/npe/include/IxOsalTypes.h | 16 -- drivers/net/npe/include/IxPerfProfAcc.h | 4 +- drivers/net/npe/include/IxQMgrAqmIf_p.h | 22 +-- drivers/net/npe/include/IxSspAcc.h | 2 +- drivers/net/npe/include/IxTimeSyncAcc.h | 8 +- drivers/net/npe/npe.c | 14 +- drivers/rtc/ds1374.c | 29 ++-- drivers/serial/usbtty.c | 4 +- drivers/usb/musb-new/linux-compat.h | 2 - fs/ext4/ext4_common.h | 2 - fs/ext4/ext4_journal.c | 8 +- include/at91rm9200_net.h | 4 - include/bedbug/ppc.h | 5 - include/configs/bf537-stamp.h | 2 +- include/fpga.h | 8 - include/galileo/core.h | 5 - include/linux/fb.h | 2 +- include/linux/mii.h | 2 +- include/linux/mtd/nand.h | 2 +- include/linux/types.h | 1 + include/linux/usb/gadget.h | 6 +- include/malloc.h | 2 +- include/scsi.h | 8 - include/sym53c8xx.h | 7 - include/usbdevice.h | 4 +- include/xyzModem.h | 8 - lib/bzlib.c | 76 +++++----- lib/bzlib_decompress.c | 20 +-- lib/bzlib_huffman.c | 8 +- lib/bzlib_private.h | 3 - lib/lzma/LzmaDec.c | 2 +- lib/lzma/Types.h | 3 - tools/bddb/defs.php | 18 +-- tools/patman/checkpatch.py | 14 +- tools/patman/command.py | 10 +- tools/patman/commit.py | 2 +- tools/patman/gitutil.py | 20 +-- tools/patman/patchstream.py | 36 ++--- tools/patman/patman.py | 14 +- tools/patman/series.py | 4 +- tools/patman/terminal.py | 6 +- tools/patman/test.py | 6 +- 159 files changed, 1062 insertions(+), 1280 deletions(-)
README +6 -6
@@ -1896,15 +1896,15 @@ CBFS (Coreboot Filesystem) support I2C_READ - Code that returns TRUE if the I2C data line is high, - FALSE if it is low. + Code that returns true if the I2C data line is high, + false if it is low. eg: #define I2C_READ ((immr->im_cpm.cp_pbdat & PB_SDA) != 0) I2C_SDA(bit) - If <bit> is TRUE, sets the I2C data line high. If it - is FALSE, it clears it (low). + If <bit> is true, sets the I2C data line high. If it + is false, it clears it (low). eg: #define I2C_SDA(bit) \ if(bit) immr->im_cpm.cp_pbdat |= PB_SDA; \
@@ -1912,8 +1912,8 @@ CBFS (Coreboot Filesystem) support I2C_SCL(bit) - If <bit> is TRUE, sets the I2C clock line high. If it - is FALSE, it clears it (low). + If <bit> is true, sets the I2C clock line high. If it + is false, it clears it (low). eg: #define I2C_SCL(bit) \ if(bit) immr->im_cpm.cp_pbdat |= PB_SCL; \
arch/arm/cpu/arm926ejs/spear/spear600.c +17 -20
@@ -28,9 +28,6 @@#include <asm/arch/spr_misc.h> #include <asm/arch/spr_defs.h> -#define FALSE 0 -#define TRUE (!FALSE) -static void sel_1v8 (void ) {struct misc_regs *misc_p = (struct misc_regs *)CONFIG_SPEAR_MISCBASE ;
@@ -133,8 +130,8 @@ void soc_init(void)/* * xxx_boot_selected: * -* return TRUE if the particular booting option is selected -* return FALSE otherwise +* return true if the particular booting option is selected +* return false otherwise */ static u32 read_bootstrap (void ) {
@@ -150,18 +147,18 @@ int snor_boot_selected(void)/* Check whether SNOR boot is selected */ if ((bootstrap &CONFIG_SPEAR_ONLYSNORBOOT ) ==CONFIG_SPEAR_ONLYSNORBOOT ) -return TRUE; +return true;if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) ==CONFIG_SPEAR_NORNAND8BOOT ) -return TRUE; +return true;if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) ==CONFIG_SPEAR_NORNAND16BOOT ) -return TRUE; +return true; } -return FALSE; +return false; }int nand_boot_selected (void )
@@ -172,20 +169,20 @@ int nand_boot_selected(void)/* Check whether NAND boot is selected */ if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) ==CONFIG_SPEAR_NORNAND8BOOT ) -return TRUE; +return true;if ((bootstrap &CONFIG_SPEAR_NORNANDBOOT ) ==CONFIG_SPEAR_NORNAND16BOOT ) -return TRUE; +return true; } -return FALSE; +return false; }int pnor_boot_selected (void ) {/* Parallel NOR boot is not selected in any SPEAr600 revision */ -return FALSE; +return false; }int usb_boot_selected (void )
@@ -195,39 +192,39 @@ int usb_boot_selected(void)if (USB_BOOT_SUPPORTED ) {/* Check whether USB boot is selected */ if (!(bootstrap &CONFIG_SPEAR_USBBOOT )) -return TRUE; +return true; } -return FALSE; +return false; }int tftp_boot_selected (void ) {/* TFTP boot is not selected in any SPEAr600 revision */ -return FALSE; +return false; }int uart_boot_selected (void ) {/* UART boot is not selected in any SPEAr600 revision */ -return FALSE; +return false; }int spi_boot_selected (void ) {/* SPI boot is not selected in any SPEAr600 revision */ -return FALSE; +return false; }int i2c_boot_selected (void ) {/* I2C boot is not selected in any SPEAr600 revision */ -return FALSE; +return false; }int mmc_boot_selected (void ) { -return FALSE; +return false; }void plat_late_init (void )
arch/arm/cpu/arm926ejs/spear/spl_boot.c +1 -1
@@ -120,7 +120,7 @@ u32 spl_boot(void)/* * All the supported booting devices are listed here. Each of * the booting type supported by the platform would define the -* macro xxx_BOOT_SUPPORTED to TRUE. +* macro xxx_BOOT_SUPPORTED to true. */ if (SNOR_BOOT_SUPPORTED &&snor_boot_selected ()) {
arch/blackfin/include/asm/posix_types.h +0 -3
@@ -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
arch/m68k/lib/interrupts.c +1 -1
@@ -96,7 +96,7 @@ int disable_interrupts (void) sr =get_sr ();set_sr (sr |0x0700 ); -return ((sr &0x0700 ) ==0 );/* return TRUE, if interrupts were enabled before */ +return ((sr &0x0700 ) ==0 );/* return true, if interrupts were enabled before */ }void int_handler (struct pt_regs *fp)
arch/nds32/lib/interrupts.c +1 -1
@@ -59,7 +59,7 @@ void enable_interrupts(void)/* * disable interrupts -* Return TRUE if GIE is enabled before we disable it. +* Return true if GIE is enabled before we disable it. */ int disable_interrupts (void ) {
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +1 -1
@@ -517,7 +517,7 @@ void fsl_serdes_init(void)size_t arglen;#endif #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES_A001 -int need_serdes_a001;/* TRUE == need work-around for SERDES A001 */ +bool need_serdes_a001;/* true == need work-around for SERDES A001 */ #endif #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 char buffer[HWCONFIG_BUFFER_SIZE ];
arch/powerpc/cpu/ppc4xx/44x_spd_ddr.c +34 -36
202 lines not on this page · raw message
arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c +93 -100
474 lines not on this page · raw message
arch/powerpc/cpu/ppc4xx/denali_spd_ddr2.c +4 -11
@@ -53,13 +53,6 @@/*-----------------------------------------------------------------------------+ * Defines *-----------------------------------------------------------------------------*/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#define MAXDIMMS 2#define MAXRANKS 2
@@ -279,7 +272,7 @@ static void get_spd_info(unsigned long dimm_ranks[], unsigned long num_dimm_banks) {unsigned long dimm_num; -unsigned long dimm_found = FALSE; +unsigned long dimm_found = false;unsigned long const max_ranks_per_dimm = (1 == num_dimm_banks) ?2 :1 ;unsigned char num_of_bytes;unsigned char total_size;
@@ -334,7 +327,7 @@ static void get_spd_info(unsigned long dimm_ranks[], "\n\n");spd_ddr_init_hang (); } - dimm_found = TRUE; + dimm_found = true;debug ("DIMM slot %lu: populated with %lu-rank DDR2 DIMM" "\n" , dimm_num, ranks_on_dimm);if (ranks_on_dimm > max_ranks_per_dimm) {
@@ -355,7 +348,7 @@ static void get_spd_info(unsigned long dimm_ranks[],debug ("DIMM slot %lu: Not populated\n" , dimm_num); } } -if (dimm_found == FALSE) { +if (dimm_found == false) {printf ("ERROR: No memory installed.\n" );printf ("Install at least one DDR2 DIMM.\n\n" );spd_ddr_init_hang ();
@@ -882,7 +875,7 @@ static void program_ddr0_22(unsigned long dimm_ranks[],/* Check for ECC */ if (0 == (spd_read (iic0_dimm_addr[dimm_num],11 ) &0x02 )) { - ecc_available = FALSE; + ecc_available = false; } } }
board/Marvell/common/memory.c +5 -5
@@ -383,7 +383,7 @@ unsigned int memoryGetDeviceWidth (DEVICE device)* OUTPUT: * None. * RETURN: -* False for invalid size, true otherwise. +* false for invalid size, true otherwise. * * CAUTION: PCI_functions must be implemented later To_do !!!!!!!!!!!!!!!!! *
@@ -509,7 +509,7 @@ bool memoryMapBank (MEMORY_BANK bank, unsigned int bankBase,* None. * * RETURN: -* False for invalid size, true otherwise. +* false for invalid size, true otherwise. * * CAUTION: PCI_functions must be implemented later To_do !!!!!!!!!!!!!!!!! *
@@ -624,7 +624,7 @@ bool memoryMapDeviceSpace (DEVICE device, unsigned int deviceBase,* None. * * RETURN: -* False for invalid size, true otherwise. +* false for invalid size, true otherwise. * *******************************************************************************/ bool memorySetPciWindow (PCI_MEM_WINDOW pciWindow, unsigned int pciWindowBase,
@@ -885,7 +885,7 @@ void gtMemorySetInternalSramBaseAddr (unsigned int sramBaseAddress)* None. * * RETURN: -* False for invalid size, true otherwise. +* false for invalid size, true otherwise. * *******************************************************************************/ bool memorySetProtectRegion (MEMORY_PROTECT_WINDOW window,
@@ -1380,7 +1380,7 @@ void MemoryEnableWindow (MEMORY_WINDOW window)* OUTPUT: * None. * RETURN: -* True for a closed window, false otherwise . +* true for a closed window, false otherwise . *******************************************************************************/ MEMORY_WINDOW_STATUS MemoryGetMemWindowStatus (MEMORY_WINDOW window) {
board/Marvell/db64360/mpsc.c +1 -1
@@ -966,7 +966,7 @@ static int galmpsc_set_snoop (int mpsc, int value)* None. * * RETURN: -* True for success, false otherwise. +* true for success, false otherwise. * *******************************************************************************/
board/Marvell/db64360/mv_eth.h +0 -7
@@ -46,13 +46,6 @@************************************************************************** ************************************************************************** *************************************************************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */ #ifndef MAX_SKB_FRAGS #define MAX_SKB_FRAGS 0
board/Marvell/db64460/mpsc.c +1 -1
@@ -966,7 +966,7 @@ static int galmpsc_set_snoop (int mpsc, int value)* None. * * RETURN: -* True for success, false otherwise. +* true for success, false otherwise. * *******************************************************************************/
board/Marvell/db64460/mv_eth.h +0 -7
@@ -47,13 +47,6 @@************************************************************************** ************************************************************************** *************************************************************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */ #ifndef MAX_SKB_FRAGS #define MAX_SKB_FRAGS 0
board/Marvell/include/core.h +0 -5
@@ -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 */
board/amcc/bamboo/bamboo.c +11 -11
@@ -477,16 +477,16 @@ int is_powerpc440ep_pass1(void) pvr =get_pvr ();if (pvr ==PVR_POWERPC_440EP_PASS1 ) -return TRUE; +return true;else if (pvr ==PVR_POWERPC_440EP_PASS2 ) -return FALSE; +return false;else {printf ("brdutil error 3\n" );for (;;) ; } -return (FALSE); +return (false); }/*----------------------------------------------------------------------------+
@@ -495,9 +495,9 @@ int is_powerpc440ep_pass1(void)int is_nand_selected (void ) {#ifdef CONFIG_BAMBOO_NAND -return TRUE; +return true;#else -return FALSE; +return false;#endif }
@@ -507,7 +507,7 @@ int is_nand_selected(void)unsigned char config_on_ebc_cs4_is_small_flash (void ) {/* Not implemented yet => returns constant value */ -return TRUE; +return true; }/*----------------------------------------------------------------------------+
@@ -561,7 +561,7 @@ void ext_bus_cntlr_init(void)/*-------------------------------------------------------------------------+ | PPC440EP Pass1 +-------------------------------------------------------------------------*/ -if (is_powerpc440ep_pass1 () == TRUE) { +if (is_powerpc440ep_pass1 () == true) {switch (bootstrap_settings) {case SDR0_PSTRP0_BOOTSTRAP_SETTINGS0 :/* Default Strap Settings 0 : CPU 400 - PLB 133 - Boot EBC 8 bit 33MHz */
@@ -738,7 +738,7 @@ void ext_bus_cntlr_init(void)/*------------------------------------------------------------------------- */ ebc0_cs0_bnap_value =EBC0_BNAP_SMALL_FLASH ; ebc0_cs0_bncr_value =EBC0_BNCR_SMALL_FLASH_CS0 ; -if ((is_nand_selected ()) == TRUE) { +if ((is_nand_selected ()) == true) {/* NAND Flash */ ebc0_cs1_bnap_value =EBC0_BNAP_NAND_FLASH ; ebc0_cs1_bncr_value =EBC0_BNCR_NAND_FLASH_CS1 ;
@@ -765,7 +765,7 @@ void ext_bus_cntlr_init(void)/*------------------------------------------------------------------------- */ ebc0_cs0_bnap_value =EBC0_BNAP_LARGE_FLASH_OR_SRAM ; ebc0_cs0_bncr_value =EBC0_BNCR_LARGE_FLASH_OR_SRAM_CS0 ; -if ((is_nand_selected ()) == TRUE) { +if ((is_nand_selected ()) == true) {/* NAND Flash */ ebc0_cs1_bnap_value =EBC0_BNAP_NAND_FLASH ; ebc0_cs1_bncr_value =EBC0_BNCR_NAND_FLASH_CS1 ;
@@ -812,7 +812,7 @@ void ext_bus_cntlr_init(void) ebc0_cs0_bnap_value =0 ; ebc0_cs0_bncr_value =0 ; -if ((is_nand_selected ()) == TRUE) { +if ((is_nand_selected ()) == true) {/* NAND Flash */ ebc0_cs1_bnap_value =EBC0_BNAP_NAND_FLASH ; ebc0_cs1_bncr_value =EBC0_BNCR_NAND_FLASH_CS1 ;
@@ -830,7 +830,7 @@ void ext_bus_cntlr_init(void) ebc0_cs3_bncr_value =0 ; } -if ((config_on_ebc_cs4_is_small_flash ()) == TRUE) { +if ((config_on_ebc_cs4_is_small_flash ()) == true) {/* Small Flash */ ebc0_cs4_bnap_value =EBC0_BNAP_SMALL_FLASH ; ebc0_cs4_bncr_value =EBC0_BNCR_SMALL_FLASH_CS4 ;
board/amcc/bamboo/bamboo.h +0 -3
@@ -250,9 +250,6 @@#define PVR_POWERPC_440EP_PASS1 0x42221850#define PVR_POWERPC_440EP_PASS2 0x422218D3 -#define TRUE 1 -#define FALSE 0 -#define GPIO0 0#define GPIO1 1
board/amcc/yucca/yucca.c +0 -3
@@ -47,9 +47,6 @@ void fpga_init (void); #define DEBUGF(fmt,args...)#endif -#define FALSE 0 -#define TRUE 1 -int board_early_init_f (void ) {/*----------------------------------------------------------------------------+
board/bf533-ezkit/flash-defines.h +0 -2
@@ -32,8 +32,6 @@#define V_ULONG (a) (*(volatile unsigned long *)( a ))#define V_BYTE (a) (*(volatile unsigned char *)( a )) -#define TRUE 0x1 -#define FALSE 0x0#define BUFFER_SIZE 0x80000#define NO_COMMAND 0#define GET_CODES 1
board/bf533-ezkit/flash.c +2 -2
@@ -309,7 +309,7 @@ int read_flash(long nOffset, int *pnValue) nValue = *(volatile unsigned short *)addr;SSYNC (); *pnValue = nValue; -return TRUE; +return true; }int poll_toggle_bit (long lOffset)
@@ -398,7 +398,7 @@ int erase_block_flash(int nBlock, unsigned long address)long ulSectorOff =0x0 ;if ((nBlock <0 ) || (nBlock > AFP_NumSectors)) -return FALSE; +return false; ulSectorOff = (address -CONFIG_SYS_FLASH_BASE );
board/bf533-stamp/video.h +0 -3
@@ -9,9 +9,6 @@#define YELLOW (0xD292D210)/* yellow pixel pattern */ #define WHITE (0xFE80FE80)/* white pixel pattern */ -#define true 1 -#define false 0 - typedef struct { unsigned int sav; unsigned int eav;
board/esd/common/lcd.c +5 -5
@@ -260,7 +260,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,/* * Big epson detected */ - reg_byte_swap = FALSE; + reg_byte_swap = false; palette_index =0x1e2 ; palette_value =0x1e4 ; lcd_depth =16 ;
@@ -269,7 +269,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,/* * Big epson detected (with register swap bug) */ - reg_byte_swap = TRUE; + reg_byte_swap = true; palette_index =0x1e3 ; palette_value =0x1e5 ; lcd_depth =16 ;
@@ -278,7 +278,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,/* * Small epson detected (704) */ - reg_byte_swap = FALSE; + reg_byte_swap = false; palette_index =0x15 ; palette_value =0x17 ; lcd_depth =8 ;
@@ -287,7 +287,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,/* * Small epson detected (705) */ - reg_byte_swap = FALSE; + reg_byte_swap = false; palette_index =0x15 ; palette_value =0x17 ; lcd_depth =8 ;
@@ -300,7 +300,7 @@ int lcd_init(uchar *lcd_reg, uchar *lcd_mem, S1D_REGS *regs, int reg_count,/* * S1D13505 detected */ - reg_byte_swap = TRUE; + reg_byte_swap = true; palette_index =0x25 ; palette_value =0x27 ; lcd_depth =16 ;
board/esd/common/lcd.h +0 -5
@@ -35,11 +35,6 @@#define LOAD_LONG (data) SWAP_LONG(data)#define LOAD_SHORT (data) SWAP_SHORT(data) -#ifndef FALSE -#define FALSE 0 -#define TRUE (!FALSE) -#endif -#define S1D_WRITE_PALETTE (p,i,r,g,b) \ { \ out_8(&((uchar*)(p))[palette_index], (uchar)(i)); \
board/esd/cpci750/mpsc.c +1 -1
@@ -967,7 +967,7 @@ static int galmpsc_set_snoop (int mpsc, int value)* None. * * RETURN: -* True for success, false otherwise. +* true for success, false otherwise. * *******************************************************************************/
board/esd/cpci750/mv_eth.h +0 -7
@@ -47,13 +47,6 @@************************************************************************** ************************************************************************** *************************************************************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */ #ifndef MAX_SKB_FRAGS #define MAX_SKB_FRAGS 0
board/esd/dasa_sim/cmd_dasa_sim.c +1 -5
@@ -30,10 +30,6 @@#define OK 0#define ERROR (-1) -#define TRUE 1 -#define FALSE 0 - -extern u_long pci9054_iobase;
@@ -97,7 +93,7 @@ static int PciEepromWriteLongVPD (int offs, unsigned int value) } } -return TRUE; +return true; }
board/esd/pmc440/fpga.c +8 -8
@@ -113,7 +113,7 @@ void fpga_serialslave_init(void) {debug ("%s:%d: Initialize serial slave interface\n" , __FUNCTION__, __LINE__); -fpga_pgm_fn (FALSE, FALSE,0 );/* make sure program pin is inactive */ +fpga_pgm_fn (false, false,0 );/* make sure program pin is inactive */ }
@@ -188,7 +188,7 @@ int fpga_done_fn(int cookie)int fpga_pre_config_fn (int cookie) {debug ("%s:%d: FPGA pre-configuration\n" , __FUNCTION__, __LINE__); -fpga_reset (TRUE); +fpga_reset (true);/* release init# */ out_be32 ((void *)GPIO0_OR ,in_be32 ((void *)GPIO0_OR ) |GPIO0_FPGA_FORCEINIT );
@@ -213,9 +213,9 @@ int fpga_post_config_fn(int cookie)/* enable PLD0..7 pins */ out_be32 ((void *)GPIO1_OR ,in_be32 ((void *)GPIO1_OR ) & ~GPIO1_IOEN_N ); -fpga_reset (TRUE); +fpga_reset (true);udelay (100 ); -fpga_reset (FALSE); +fpga_reset (false);udelay (100 );FPGA_OUT32 (&fpga->status, (gd->board_type <<STATUS_HWREV_SHIFT ) &STATUS_HWREV_MASK );
@@ -296,7 +296,7 @@ void ngcc_fpga_serialslave_init(void) __FUNCTION__, __LINE__);/* make sure program pin is inactive */ -ngcc_fpga_pgm_fn (FALSE, FALSE,0 ); +ngcc_fpga_pgm_fn (false, false,0 ); }/*
@@ -382,10 +382,10 @@ int ngcc_fpga_pre_config_fn(int cookie)pmc440_fpga_t *fpga = (pmc440_fpga_t *)FPGA_BA ;debug ("%s:%d: FPGA pre-configuration\n" , __FUNCTION__, __LINE__); -ngcc_fpga_reset (TRUE); +ngcc_fpga_reset (true);FPGA_CLRBITS (&fpga->ctrla,0xfffffe00 ); -ngcc_fpga_reset (TRUE); +ngcc_fpga_reset (true);return 0 ; }
@@ -401,7 +401,7 @@ int ngcc_fpga_post_config_fn(int cookie)debug ("%s:%d: NGCC FPGA post configuration\n" , __FUNCTION__, __LINE__);udelay (100 ); -ngcc_fpga_reset (FALSE); +ngcc_fpga_reset (false);FPGA_SETBITS (&fpga->ctrla,0x29f8c000 );
board/evb64260/eth_addrtbl.c +4 -7
@@ -6,9 +6,6 @@#include "eth.h" #include "eth_addrtbl.h" -#define TRUE 1 -#define FALSE 0 -#define PRINTF printf#ifdef CONFIG_GT_USE_MAC_HASH_TABLE
@@ -160,8 +157,8 @@ u32 hashTableFunction (u32 macH, u32 macL, u32 HashSize, u32 hash_mode)* rd - the RD field in the address table. * Outputs * address table entry is added. -* TRUE if success. -* FALSE if table full +* true if success. +* false if table full */ int addAddressTableEntry (u32 port,u32 macH,u32 macL,u32 rd,u32 skip) {
@@ -206,7 +203,7 @@ int addAddressTableEntry (u32 port, u32 macH, u32 macL, u32 rd, u32 skip)if (i ==HOP_NUMBER ) {PRINTF ("addGT64260addressTableEntry: table section is full\n" ); -return (FALSE); +return (false); }/*
@@ -215,7 +212,7 @@ int addAddressTableEntry (u32 port, u32 macH, u32 macL, u32 rd, u32 skip) entry->hi = newHi; entry->lo = newLo;DCACHE_FLUSH_N_SYNC ((u32 ) entry,MAC_ENTRY_SIZE ); - return (TRUE); + return (true); }#endif /* CONFIG_GT_USE_MAC_HASH_TABLE */
board/gen860t/fpga.c +4 -4
@@ -182,7 +182,7 @@ void fpga_selectmap_init (void) {PRINTF ("%s:%d: Initialize SelectMap interface\n" , __FUNCTION__, __LINE__); -fpga_pgm_fn (FALSE, FALSE,0 );/* make sure program pin is inactive */ +fpga_pgm_fn (false, false,0 );/* make sure program pin is inactive */ }
@@ -314,7 +314,7 @@ int fpga_abort_fn (int cookie)int fpga_pre_config_fn (int cookie) {PRINTF ("%s:%d: FPGA pre-configuration\n" , __FUNCTION__, __LINE__); -fpga_reset (TRUE); +fpga_reset (true);return 0 ; }
@@ -328,9 +328,9 @@ int fpga_post_config_fn (int cookie)int rc;PRINTF ("%s:%d: FPGA post configuration\n" , __FUNCTION__, __LINE__); -fpga_reset (TRUE); +fpga_reset (true);udelay (1000 ); -fpga_reset (FALSE); +fpga_reset (false);udelay (1000 );/*
board/matrix_vision/mvblx/mvblx.c +1 -1
@@ -162,7 +162,7 @@ int board_eth_init(bd_t *bis)int overwrite_console (void ) { -/* return TRUE if console should be overwritten */ +/* return true if console should be overwritten */ return 0 ; }
board/mousse/flash.c +1 -1
@@ -450,7 +450,7 @@ STATUS flashWrite (flash_dev_t * dev, int pos, char *buf, int len) }/* -* flashWritable returns TRUE if a range contains all F's. +* flashWritable returns true if a range contains all F's. */ STATUS flashWritable (flash_dev_t * dev,int pos,int len)
board/mpl/common/isa.c +3 -10
@@ -41,13 +41,6 @@ #define PRINTF(fmt,args...)#endif -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#if defined(CONFIG_PIP405 )extern int drv_isa_kbd_init (void );
@@ -116,9 +109,9 @@ unsigned char open_cfg_super_IO(int address)out8 (CONFIG_SYS_ISA_IO_BASE_ADDRESS | address,0x55 );/* open config */ out8 (CONFIG_SYS_ISA_IO_BASE_ADDRESS | address,0x20 );/* set address to DEV ID */ if (in8 (CONFIG_SYS_ISA_IO_BASE_ADDRESS | address |0x1 )==0x40 )/* ok Device ID is correct */ -return TRUE; +return true;else -return FALSE; +return false; }void close_cfg_super_IO (int address)
@@ -179,7 +172,7 @@ void isa_sio_loadtable(void)void isa_sio_setup (void ) { -if (open_cfg_super_IO (SIO_CFG_PORT )==TRUE) +if (open_cfg_super_IO (SIO_CFG_PORT )==true) {isa_sio_loadtable ();close_cfg_super_IO (0x3F0 );
board/mpl/mip405/mip405.c +1 -3
@@ -77,8 +77,6 @@ DECLARE_GLOBAL_DATA_PTR;#undef SDRAM_DEBUG#define ENABLE_ECC /* for ecc boards */ -#define FALSE 0 -#define TRUE 1/* stdlib.h causes some compatibility problems; should fixe these! -- wd */ #ifndef __ldiv_t_defined
@@ -771,7 +769,7 @@ int last_stage_init (void)int overwrite_console (void ) { -return ((in8 (PLD_EXT_CONF_REG ) &0x1 )==0 );/* return TRUE if console should be overwritten */ +return ((in8 (PLD_EXT_CONF_REG ) &0x1 )==0 );/* return true if console should be overwritten */ }
board/mpl/pip405/pip405.c +3 -6
@@ -36,9 +36,6 @@ DECLARE_GLOBAL_DATA_PTR;#undef SDRAM_DEBUG -#define FALSE 0 -#define TRUE 1 -/* stdlib.h causes some compatibility problems; should fixe these! -- wd */ #ifndef __ldiv_t_defined typedef struct {
@@ -700,7 +697,7 @@ int misc_init_r (void)int overwrite_console (void ) { -return (in8 (CONFIG_PORT_ADDR ) &0x1 );/* return TRUE if console should be overwritten */ +return (in8 (CONFIG_PORT_ADDR ) &0x1 );/* return true if console should be overwritten */ }
@@ -945,7 +942,7 @@ void print_pip405_info (void)void user_led0 (unsigned char on) { -if (on == TRUE) +if (on == true)out8 (PLD_LED_USER_REG , (in8 (PLD_LED_USER_REG ) |0x1 ));else out8 (PLD_LED_USER_REG , (in8 (PLD_LED_USER_REG ) &0xfe ));
@@ -953,7 +950,7 @@ void user_led0 (unsigned char on)void user_led1 (unsigned char on) { -if (on == TRUE) +if (on == true)out8 (PLD_LED_USER_REG , (in8 (PLD_LED_USER_REG ) |0x2 ));else out8 (PLD_LED_USER_REG , (in8 (PLD_LED_USER_REG ) &0xfd ));
board/prodrive/p3mx/mpsc.c +1 -1
@@ -962,7 +962,7 @@ static int galmpsc_set_snoop (int mpsc, int value)* None. * * RETURN: -* True for success, false otherwise. +* true for success, false otherwise. * *******************************************************************************/
board/prodrive/p3mx/mv_eth.h +0 -7
@@ -47,13 +47,6 @@************************************************************************** ************************************************************************** *************************************************************************/ -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -/* In case not using SG on Tx, define MAX_SKB_FRAGS as 0 */ #ifndef MAX_SKB_FRAGS #define MAX_SKB_FRAGS 0
board/sacsng/clkinit.c +2 -2
@@ -94,11 +94,11 @@ uint Daq_BRG_Get_Div16(uint brg)if (*brg_ptr &CPM_BRG_DIV16 ) {/* DIV16 active */ -return (TRUE); +return (true); }else {/* DIV16 inactive */ -return (FALSE); +return (false); } }
board/sacsng/clkinit.h +0 -5
@@ -22,11 +22,6 @@* MA 02111-1307 USA */ -#ifndef FALSE -#define FALSE 0 -#define TRUE (!FALSE) -#endif -#define SLRCLK_EN_MASK 0x00040000/* PA13 - SLRCLK_EN* */ #define MIN_SAMPLE_RATE 4000/* Minimum sample rate */
board/spear/x600/fpga.c +4 -4
@@ -113,7 +113,7 @@ static int fpga_done_fn(int cookie)static int fpga_pre_config_fn (int cookie) {debug ("%s:%d: FPGA pre-configuration\n" , __func__, __LINE__); -fpga_reset (TRUE); +fpga_reset (true);return 0 ; }
@@ -128,9 +128,9 @@ static int fpga_post_config_fn(int cookie)debug ("%s:%d: FPGA post configuration\n" , __func__, __LINE__); -fpga_reset (TRUE); +fpga_reset (true);udelay (100 ); -fpga_reset (FALSE); +fpga_reset (false);udelay (100 );return rc;
@@ -200,7 +200,7 @@ static Xilinx_desc fpga[CONFIG_FPGA_COUNT] = {static void fpga_serialslave_init (void ) {debug ("%s:%d: Initialize serial slave interface\n" , __func__, __LINE__); -fpga_pgm_fn (FALSE, FALSE,0 );/* make sure program pin is inactive */ +fpga_pgm_fn (false, false,0 );/* make sure program pin is inactive */ }static int expi_setup (int freq)
board/teejet/mt_ventoux/mt_ventoux.c +2 -2
@@ -177,9 +177,9 @@ int fpga_post_config_fn(int cookie) {debug ("%s:%d: FPGA post-configuration\n" , __func__, __LINE__); -fpga_reset (TRUE); +fpga_reset (true);udelay (100 ); -fpga_reset (FALSE); +fpga_reset (false);return 0 ; }
board/xilinx/common/xbasic_types.c +1 -1
@@ -77,7 +77,7 @@ unsigned int XAssertStatus;* such that it does not wait infinitely. Use the debugger to disable the * waiting during testing of asserts. */ -u32 XWaitInAssert = TRUE; +u32 XWaitInAssert = true;/* The callback function to be invoked when an assert is taken */ static XAssertCallback XAssertCallbackRoutine = (XAssertCallback )NULL ;
board/xilinx/common/xbasic_types.h +0 -8
@@ -68,14 +68,6 @@/***************************** Include Files *********************************/ /************************** Constant Definitions *****************************/ - -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#ifndef NULL #define NULL 0#endif
board/xilinx/common/xdma_channel.c +1 -1
@@ -151,7 +151,7 @@ XDmaChannel_Initialize(XDmaChannel * InstancePtr, u32 BaseAddress)* * RETURN VALUE: * -* TRUE if the DMA channel component is ready, FALSE otherwise. +* true if the DMA channel component is ready, false otherwise. * * NOTES: *
board/xilinx/common/xdma_channel_sg.c +2 -2
@@ -694,8 +694,8 @@ XDmaChannel_CreateSgList(XDmaChannel * InstancePtr,* * RETURN VALUE: * -* A value of TRUE if the scatter gather list is empty, otherwise a value of -* FALSE. +* A value of true if the scatter gather list is empty, otherwise a value of +* false. * * NOTES: *
board/xilinx/common/xpacket_fifo_v1_00_b.h +5 -5
@@ -178,7 +178,7 @@ typedef struct {* * @return * -* TRUE if the packet FIFO is almost empty, FALSE otherwise. +* true if the packet FIFO is almost empty, false otherwise. * * @note *
@@ -200,7 +200,7 @@ typedef struct {* * @return * -* TRUE if the packet FIFO is almost full, FALSE otherwise. +* true if the packet FIFO is almost full, false otherwise. * * @note *
@@ -221,7 +221,7 @@ typedef struct {* * @return * -* TRUE if the packet FIFO is empty, FALSE otherwise. +* true if the packet FIFO is empty, false otherwise. * * @note *
@@ -242,7 +242,7 @@ typedef struct {* * @return * -* TRUE if the packet FIFO is full, FALSE otherwise. +* true if the packet FIFO is full, false otherwise. * * @note *
@@ -267,7 +267,7 @@ typedef struct {* * @return * -* TRUE if the packet FIFO is deadlocked, FALSE otherwise. +* true if the packet FIFO is deadlocked, false otherwise. * * @note *
board/xilinx/common/xversion.c +6 -6
@@ -163,7 +163,7 @@ XVersion_Pack(XVersion * InstancePtr, u16 * PackedVersionPtr)* * @return * -* TRUE if the versions are equal, FALSE otherwise. +* true if the versions are equal, false otherwise. * * @note *
@@ -187,14 +187,14 @@ XVersion_IsEqual(XVersion * InstancePtr, XVersion * VersionPtr)*/ for (Index =0 ; Index <sizeof (XVersion); Index++) {if (Version1[Index] != Version2[Index]) { -return FALSE; +return false; } }/* No byte was found to be different between the versions, so indicate * the versions are equal */ -return TRUE; +return true; }/*****************************************************************************
@@ -322,7 +322,7 @@ XVersion_Copy(XVersion * InstancePtr, XVersion * VersionPtr)* * @return * -* TRUE if the version string is a valid format, FALSE otherwise. +* true if the version string is a valid format, false otherwise. * * @note *
@@ -343,8 +343,8 @@ IsVersionStringValid(s8 * StringPtr) (StringPtr[XVE_MINOR_ONES_CHAR] > '9') || (StringPtr[XVE_COMP_CHAR] < 'a') || (StringPtr[XVE_COMP_CHAR] > 'z')) { -return FALSE; +return false; } -return TRUE; +return true; }
common/bedbug.c +34 -34
225 lines not on this page · raw message
common/cmd_bedbug.c +2 -2
@@ -292,7 +292,7 @@ int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])return 1 ; } -if (!find_next_address ((unsigned char *) &addr, FALSE, bug_ctx.regs)) +if (!find_next_address ((unsigned char *) &addr, false, bug_ctx.regs))return 1 ;if (bug_ctx.set)
@@ -323,7 +323,7 @@ int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])return 1 ; } -if (!find_next_address ((unsigned char *) &addr, TRUE, bug_ctx.regs)) +if (!find_next_address ((unsigned char *) &addr, true, bug_ctx.regs))return 1 ;if (bug_ctx.set)
common/cmd_fdc.c +54 -61
334 lines not on this page · raw message
common/cmd_scsi.c +9 -9
@@ -110,7 +110,7 @@ void scsi_scan(int mode) scsi_dev_desc[i].vendor[0 ]=0 ; scsi_dev_desc[i].product[0 ]=0 ; scsi_dev_desc[i].revision[0 ]=0 ; - scsi_dev_desc[i].removable=FALSE; + scsi_dev_desc[i].removable=false; scsi_dev_desc[i].if_type=IF_TYPE_SCSI ; scsi_dev_desc[i].dev=i; scsi_dev_desc[i].part_type=PART_TYPE_UNKNOWN ;
@@ -125,7 +125,7 @@ void scsi_scan(int mode) pccb->pdata=(unsigned char *)&tempbuff; pccb->datalen=512 ;scsi_setup_inquiry (pccb); -if (scsi_exec (pccb)!=TRUE) { +if (scsi_exec (pccb)!=true) {if (pccb->contr_stat==SCSI_SEL_TIME_OUT ) {debug ("Selection timeout ID %d\n" ,pccb->target);continue ;/* selection timeout => assuming no device present */
@@ -139,7 +139,7 @@ void scsi_scan(int mode)continue ;/* skip unknown devices */ }if ((modi&0x80 )==0x80 )/* drive is removable */ - scsi_dev_desc[scsi_max_devs].removable=TRUE; + scsi_dev_desc[scsi_max_devs].removable=true;/* get info for this device */ scsi_ident_cpy ((unsigned char *)&scsi_dev_desc[scsi_max_devs].vendor[0 ], &tempbuff[8 ],8 );
@@ -152,8 +152,8 @@ void scsi_scan(int mode) pccb->datalen=0 ;scsi_setup_test_unit_ready (pccb); -if (scsi_exec (pccb)!=TRUE) { -if (scsi_dev_desc[scsi_max_devs].removable==TRUE) { +if (scsi_exec (pccb)!=true) { +if (scsi_dev_desc[scsi_max_devs].removable==true) { scsi_dev_desc[scsi_max_devs].type=perq; goto removable; }
@@ -404,7 +404,7 @@ static ulong scsi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)debug ("scsi_read_ext: startblk " LBAF ", blccnt %x buffer %lx\n" , start, smallblks, buf_addr); -if (scsi_exec (pccb)!=TRUE) { +if (scsi_exec (pccb)!=true) {scsi_print_error (pccb); blkcnt-=blks;break ;
@@ -458,7 +458,7 @@ static ulong scsi_write(int device, ulong blknr, }debug ("%s: startblk " LBAF ", blccnt %x buffer %lx\n" , __func__, start, smallblks, buf_addr); -if (scsi_exec (pccb) != TRUE) { +if (scsi_exec (pccb) != true) {scsi_print_error (pccb); blkcnt -= blks;break ;
@@ -521,7 +521,7 @@ int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz) pccb->msgout[0 ] =SCSI_IDENTIFY ;/* NOT USED */ pccb->datalen =8 ; -if (scsi_exec (pccb) != TRUE) +if (scsi_exec (pccb) != true)return 1 ; *capacity = ((lbaint_t)pccb->pdata[0] << 24) |
@@ -547,7 +547,7 @@ int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz) pccb->msgout[0 ] =SCSI_IDENTIFY ;/* NOT USED */ pccb->datalen =16 ; -if (scsi_exec (pccb) != TRUE) +if (scsi_exec (pccb) != true)return 1 ; *capacity = ((uint64_t)pccb->pdata[0] << 56) |
common/dlmalloc.c +1 -1
@@ -201,7 +201,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_THRESHOLDDEFAULT_TOP_PAD
common/dlmalloc.src +1 -1
@@ -198,7 +198,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
drivers/bios_emulator/atibios.c +2 -6
@@ -52,10 +52,6 @@/* Length of the BIOS image */ #define MAX_BIOSLEN (128 * 1024L) -/* Define some useful types and macros */ -#define true 1 -#define false 0 -/* Place to save PCI BAR's that we change and later restore */ static u32 saveROMBaseAddress;static u32 saveBaseAddress10;
@@ -242,7 +238,7 @@ pcidev - PCI device info for the video card on the bus to boot VGAInfo - BIOS emulator VGA info structure RETURNS: -True if successfully initialised, false if not. +true if successfully initialised, false if not. REMARKS: Loads and POST's the display controllers BIOS, directly from the BIOS
@@ -295,7 +291,7 @@ static int PCI_postController(pci_dev_t pcidev, BE_VGAInfo * VGAInfo) PARAMETERS: pcidev - PCI device info for the video card on the bus to boot pVGAInfo - Place to return VGA info structure is requested -cleanUp - True to clean up on exit, false to leave emulator active +cleanUp - true to clean up on exit, false to leave emulator active REMARKS: Boots the PCI/AGP video card on the bus using the Video ROM BIOS image
drivers/bios_emulator/include/biosemu.h +2 -2
@@ -127,9 +127,9 @@ biosmem_limit - Limit of the BIOS imagebusmem_base - Base of the VGA bus memory timer - Timer used to emulate PC timer ports timer0 - Latched value for timer 0 -timer0Latched - True if timer 0 value was just latched +timer0Latched - true if timer 0 value was just latched timer2 - Current value for timer 2 -emulateVGA - True to emulate VGA I/O and memory accesses +emulateVGA - true to emulate VGA I/O and memory accesses ****************************************************************************/ typedef struct {
drivers/bios_emulator/x86emu/debug.c +1 -1
@@ -309,7 +309,7 @@ void x86emu_single_step(void)case 'P' : noDecode = (noDecode) ?0 :1 ;printk ("Toggled decoding to %s\n" , - (noDecode) ?"FALSE" :"TRUE" ); + (noDecode) ?"false" :"true" );break ;case 't' :case 0 :
drivers/block/ahci.c +3 -3
@@ -865,14 +865,14 @@ int scsi_exec(ccb *pccb)break ;default :printf ("Unsupport SCSI command 0x%02x\n" , pccb->cmd[0 ]); -return FALSE; +return false; }if (ret) {debug ("SCSI command 0x%02x ret errno %d\n" , pccb->cmd[0 ], ret); -return FALSE; +return false; } -return TRUE; +return true; }
drivers/block/sata_dwc.c +17 -17
@@ -360,7 +360,7 @@ int init_sata(int dev)if (status ==0x7f ) {printf ("Hard Disk not found.\n" ); dev_state =SATA_NODEVICE ; - rc = FALSE; + rc = false;return rc; }
@@ -381,7 +381,7 @@ int init_sata(int dev)printf ("** TimeOUT **\n" ); dev_state =SATA_NODEVICE ; - rc = FALSE; + rc = false;return rc; }if ((i >=100 ) && ((i %100 ) ==0 ))
@@ -458,7 +458,7 @@ static int sata_dwc_softreset(struct ata_port *ap) }else {printf ("No device found\n" ); dev_state =SATA_NODEVICE ; -return FALSE; +return false; } tmp =ATA_DEVICE_OBS ;
@@ -737,7 +737,7 @@ static int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, status =ata_busy_wait (ap,ATA_BUSY ,30000 );if (status &ATA_BUSY ) {printf ("BSY = 0 check. timeout.\n" ); - rc = FALSE; + rc = false;return rc; }
@@ -987,7 +987,7 @@ unsigned ata_exec_internal(struct ata_device *dev, status =ata_busy_wait (ap,ATA_BUSY ,300000 );if (status &ATA_BUSY ) {printf ("BSY = 0 check. timeout.\n" ); - rc = FALSE; + rc = false;return rc; }
@@ -997,7 +997,7 @@ unsigned ata_exec_internal(struct ata_device *dev, tag =ATA_TAG_INTERNAL ;if (test_and_set_bit (tag, &ap->qc_allocated)) { - rc = FALSE; + rc = false;return rc; }
@@ -1656,14 +1656,14 @@ static int check_sata_dev_state(void) ret =ata_dev_read_sectors (pdata, datalen,0 ,1 ); -if (ret == TRUE) +if (ret == true)break ; i++;if (i > (ATA_RESET_TIME *100 )) {printf ("** TimeOUT **\n" ); dev_state =SATA_NODEVICE ; -return FALSE; +return false; }if ((i >=100 ) && ((i %100 ) ==0 ))
@@ -1672,7 +1672,7 @@ static int check_sata_dev_state(void) dev_state =SATA_READY ; -return TRUE; +return true; } static unsigned int ata_dev_set_feature(struct ata_device *dev,
@@ -1772,7 +1772,7 @@ ulong sata_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer) blks =0 ; } -if (ata_dev_read_sectors (pdata, datalen, block, n_block) != TRUE) { +if (ata_dev_read_sectors (pdata, datalen, block, n_block) != true) {printf ("sata_dwc : Hard disk read error.\n" ); blkcnt -= blks;break ;
@@ -1795,7 +1795,7 @@ static int ata_dev_read_sectors(unsigned char *pdata, unsigned long datalen,int may_fallback =1 ;if (dev_state ==SATA_ERROR ) -return FALSE; +return false;ata_dev_select (ap, dev->devno,1 ,1 );
@@ -1893,11 +1893,11 @@ retry: goto err_out; } -return TRUE; +return true; err_out:printf ("failed to READ SECTORS (%s, err_mask=0x%x)\n" , reason, err_mask); -return FALSE; +return false; }#if defined(CONFIG_SATA_DWC ) && !defined(CONFIG_LBA48 )
@@ -1946,7 +1946,7 @@ ulong sata_write(int device, ulong blknr, lbaint_t blkcnt, const void *buffer) blks =0 ; } -if (ata_dev_write_sectors (pdata, datalen, block, n_block) != TRUE) { +if (ata_dev_write_sectors (pdata, datalen, block, n_block) != true) {printf ("sata_dwc : Hard disk read error.\n" ); blkcnt -= blks;break ;
@@ -1969,7 +1969,7 @@ static int ata_dev_write_sectors(unsigned char* pdata, unsigned long datalen,int may_fallback =1 ;if (dev_state ==SATA_ERROR ) -return FALSE; +return false;ata_dev_select (ap, dev->devno,1 ,1 );
@@ -2068,9 +2068,9 @@ retry: goto err_out; } -return TRUE; +return true; err_out:printf ("failed to WRITE SECTORS (%s, err_mask=0x%x)\n" , reason, err_mask); -return FALSE; +return false; }
drivers/block/sata_dwc.h +0 -7
@@ -467,11 +467,4 @@ struct ata_port { unsigned char *pdata; }; -#ifndef TRUE -#define TRUE 1 -#endif -#ifndef FALSE -#define FALSE 0 -#endif -#endif
drivers/block/sym53c8xx.c +7 -7
@@ -764,9 +764,9 @@ int scsi_exec(ccb *pccb) retry:scsi_issue (pccb);if (pccb->contr_stat!=SIR_COMPLETE ) -return FALSE; +return false;if (pccb->status==S_GOOD ) -return TRUE; +return true;if (pccb->status==S_CHECK_COND ) {/* check condition */ for (i=0 ;i<16 ;i++) tmpcmd[i]=pccb->cmd[i];
@@ -797,12 +797,12 @@ retry:case SENSE_NO_SENSE :case SENSE_RECOVERED_ERROR :/* seems to be ok */ -return TRUE; +return true;break ;case SENSE_NOT_READY :if ((pccb->sense_buf[12 ]!=0x04 )||(pccb->sense_buf[13 ]!=0x01 )) {/* if device is not in process of becoming ready */ -return FALSE; +return false;break ; }/* else fall through */ case SENSE_UNIT_ATTENTION :
@@ -814,13 +814,13 @@ retry: goto retry; }PRINTF ("Target %d not ready, %d retried\n" ,pccb->target,retrycnt); -return FALSE; +return false;default : -return FALSE; +return false; } }PRINTF ("Status = %X\n" ,pccb->status); -return FALSE; +return false; }
drivers/fpga/ACEX1K.c +7 -7
@@ -140,7 +140,7 @@ static int ACEX1K_ps_load(Altera_desc *desc, const void *buf, size_t bsize) }/* Establish the initial state */ - (*fn->config) (TRUE, TRUE, cookie);/* Assert nCONFIG */ + (*fn->config) (true, true, cookie);/* Assert nCONFIG */ udelay (2 );/* T_cfg > 2us */
@@ -152,7 +152,7 @@ static int ACEX1K_ps_load(Altera_desc *desc, const void *buf, size_t bsize)return FPGA_FAIL ; } - (*fn->config) (FALSE, TRUE, cookie);/* Deassert nCONFIG */ + (*fn->config) (false, true, cookie);/* Deassert nCONFIG */ udelay (2 );/* T_cf2st1 < 4us */ /* Wait for nSTATUS to be released (i.e. deasserted) */
@@ -192,13 +192,13 @@ static int ACEX1K_ps_load(Altera_desc *desc, const void *buf, size_t bsize) i =8 ; do { /* Deassert the clock */ - (*fn->clk) (FALSE, TRUE, cookie); + (*fn->clk) (false, true, cookie); CONFIG_FPGA_DELAY (); /* Write data */ - (*fn->data) ( (val & 0x01), TRUE, cookie); + (*fn->data) ( (val & 0x01), true, cookie); CONFIG_FPGA_DELAY (); /* Assert the clock */ - (*fn->clk) (TRUE, TRUE, cookie); + (*fn->clk) (true, true, cookie); CONFIG_FPGA_DELAY (); val >>= 1; i --;
@@ -232,9 +232,9 @@ static int ACEX1K_ps_load(Altera_desc *desc, const void *buf, size_t bsize)for (i =0 ; i <12 ; i++) {CONFIG_FPGA_DELAY (); - (*fn->clk) (TRUE, TRUE, cookie);/* Assert the clock pin */ + (*fn->clk) (true, true, cookie);/* Assert the clock pin */ CONFIG_FPGA_DELAY (); - (*fn->clk) (FALSE, TRUE, cookie);/* Deassert the clock pin */ + (*fn->clk) (false, true, cookie);/* Deassert the clock pin */ } ret_val =FPGA_SUCCESS ;
drivers/fpga/altera.c +2 -2
@@ -215,7 +215,7 @@ int altera_info( Altera_desc *desc )static int altera_validate (Altera_desc * desc,const char *fn) { -int ret_val = FALSE; +int ret_val = false;if (desc) { if ((desc->family > min_altera_type) &&
@@ -223,7 +223,7 @@ static int altera_validate (Altera_desc * desc, const char *fn)if ((desc->iface > min_altera_iface_type) && (desc->iface < max_altera_iface_type)) {if (desc->size) { - ret_val = TRUE; + ret_val = true; }else {printf ("%s: NULL part size\n" , fn); }
drivers/fpga/cyclon2.c +3 -3
@@ -144,9 +144,9 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize) }/* Establish the initial state */ - (*fn->config) (FALSE, TRUE, cookie);/* De-assert nCONFIG */ + (*fn->config) (false, true, cookie);/* De-assert nCONFIG */ udelay (100 ); - (*fn->config) (TRUE, TRUE, cookie);/* Assert nCONFIG */ + (*fn->config) (true, true, cookie);/* Assert nCONFIG */ udelay (2 );/* T_cfg > 2us */
@@ -164,7 +164,7 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)/* Get ready for the burn */ CONFIG_FPGA_DELAY (); - ret = (*fn->write) (buf, bsize, TRUE, cookie); + ret = (*fn->write) (buf, bsize, true, cookie);if (ret) {puts ("** Write failed.\n" ); (*fn->abort) (cookie);
drivers/fpga/lattice.c +2 -2
@@ -275,7 +275,7 @@ signed char ispVM(void)static int lattice_validate (Lattice_desc *desc,const char *fn) { -int ret_val = FALSE; +int ret_val = false;if (desc) { if ((desc->family > min_lattice_type) &&
@@ -283,7 +283,7 @@ static int lattice_validate(Lattice_desc *desc, const char *fn)if ((desc->iface > min_lattice_iface_type) && (desc->iface < max_lattice_iface_type)) {if (desc->size) { - ret_val = TRUE; + ret_val = true; }else {printf ("%s: NULL part size\n" , fn); }
drivers/fpga/spartan2.c +29 -29
151 lines not on this page · raw message
drivers/fpga/spartan3.c +30 -30
161 lines not on this page · raw message
drivers/fpga/virtex2.c +17 -17
@@ -221,7 +221,7 @@ static int Virtex2_ssm_load(Xilinx_desc *desc, const void *buf, size_t bsize)* There is no maximum value for the pulse width. Check to make * sure that INIT_B goes low after assertion of PROG_B */ - (*fn->pgm) (TRUE, TRUE, cookie); + (*fn->pgm) (true, true, cookie);udelay (10 ); ts =get_timer (0 ); do {
@@ -234,9 +234,9 @@ static int Virtex2_ssm_load(Xilinx_desc *desc, const void *buf, size_t bsize) } }while (!(*fn->init) (cookie)); - (*fn->pgm) (FALSE, TRUE, cookie); + (*fn->pgm) (false, true, cookie);CONFIG_FPGA_DELAY (); - (*fn->clk) (TRUE, TRUE, cookie); + (*fn->clk) (true, true, cookie);/* * Start a timer and wait for INIT_B to go high
@@ -253,8 +253,8 @@ static int Virtex2_ssm_load(Xilinx_desc *desc, const void *buf, size_t bsize) } }while ((*fn->init) (cookie) && (*fn->busy) (cookie)); - (*fn->wr) (TRUE, TRUE, cookie); - (*fn->cs) (TRUE, TRUE, cookie); + (*fn->wr) (true, true, cookie); + (*fn->cs) (true, true, cookie);udelay (10000 );
@@ -286,15 +286,15 @@ static int Virtex2_ssm_load(Xilinx_desc *desc, const void *buf, size_t bsize) }#endif - (*fn->wdata) (data[bytecount++], TRUE, cookie); + (*fn->wdata) (data[bytecount++], true, cookie);CONFIG_FPGA_DELAY ();/* * Cycle the clock pin */ - (*fn->clk) (FALSE, TRUE, cookie); + (*fn->clk) (false, true, cookie);CONFIG_FPGA_DELAY (); - (*fn->clk) (TRUE, TRUE, cookie); + (*fn->clk) (true, true, cookie);#ifdef CONFIG_SYS_FPGA_CHECK_BUSY ts =get_timer (0 );
@@ -319,8 +319,8 @@ static int Virtex2_ssm_load(Xilinx_desc *desc, const void *buf, size_t bsize)* Finished writing the data; deassert FPGA CS_B and WRITE_B signals. */ CONFIG_FPGA_DELAY (); - (*fn->cs) (FALSE, TRUE, cookie); - (*fn->wr) (FALSE, TRUE, cookie); + (*fn->cs) (false, true, cookie); + (*fn->wr) (false, true, cookie);#ifdef CONFIG_SYS_FPGA_PROG_FEEDBACK putc ('\n' );
@@ -381,8 +381,8 @@ static int Virtex2_ssm_dump(Xilinx_desc *desc, const void *buf, size_t bsize)printf ("Starting Dump of FPGA Device %d...\n" , cookie); - (*fn->cs) (TRUE, TRUE, cookie); - (*fn->clk) (TRUE, TRUE, cookie);
Lines of this file are not shown. View the raw message.
drivers/net/e1000.c +60 -60
120 lines not on this page · raw message
drivers/net/e1000.h +25 -30
55 lines not on this page · raw message
drivers/net/npe/IxEthAccMac.c +36 -36
72 lines not on this page · raw message
drivers/net/npe/IxEthDBAPISupport.c +21 -21
42 lines not on this page · raw message
drivers/net/npe/include/IxAtmdAccCtrl.h +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxFeatureCtrl.h +3 -3
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxNpeDlNpeMgrUtils_p.h +8 -8
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxNpeDlNpeMgr_p.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxNpeMhConfig_p.h +8 -8
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxPerfProfAcc.h +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxQMgrAqmIf_p.h +11 -11
Lines of this file are not shown. View the raw message.
drivers/net/npe/include/IxTimeSyncAcc.h +4 -4
Lines of this file are not shown. View the raw message.
lib/bzlib.c +38 -38
76 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.9.5
Part of the diff is not shown here. View the raw message.
RFC PATCH v5 1/1 Consolidate bool type
Quoted 9 lines · York Sun
tools/patman/checkpatch.py +0
-1@@ -48,12 +48,12 @@ def FindCheckPatch(): print 'Could not find checkpatch.pl' return None -def CheckPatch(fname, verbose=False):
tools/patman/checkpatch.py def FindCheckPatch(): · line 59
Quoted 10 lines
tools/patman/checkpatch.py +2
-1+def CheckPatch(fname, verbose=false): """Run checkpatch.pl on a file. Returns: 4-tuple containing: - result: False=failure, True=ok + result: false=failure, true=ok problems: List of problems, each a dict: 'type'; error or warning 'msg': text message
You should probably limit the change to C code. :-)
-Scott
RFC PATCH v5 1/1 Consolidate bool type
Quoted 13 lines · Scott Wood
Quoted 12 lines · York Sun
tools/patman/checkpatch.py +1
-1@@ -48,12 +48,12 @@ def FindCheckPatch(): print 'Could not find checkpatch.pl' return None -def CheckPatch(fname, verbose=False): +def CheckPatch(fname, verbose=false): """Run checkpatch.pl on a file.
Quoted 10 lines
tools/patman/checkpatch.py def FindCheckPatch(): · line 59
Quoted 7 lines
tools/patman/checkpatch.py +1
-1Returns: 4-tuple containing: - result: False=failure, True=ok + result: false=failure, true=ok problems: List of problems, each a dict: 'type'; error or warning 'msg': text messageYou should probably limit the change to C code. :-)
Nice catch. I forgot Python use True and False. Will fix.
York
RFC PATCH v5 1/1 Consolidate bool type
Quoted 24 lines · York Sun
Quoted 13 lines · Scott Wood
Quoted 12 lines · York Sun
tools/patman/checkpatch.py +1
-1@@ -48,12 +48,12 @@ def FindCheckPatch(): print 'Could not find checkpatch.pl' return None -def CheckPatch(fname, verbose=False): +def CheckPatch(fname, verbose=false): """Run checkpatch.pl on a file.Quoted 10 lines
tools/patman/checkpatch.py def FindCheckPatch(): · line 59
Quoted 7 lines
tools/patman/checkpatch.py +1
-1Returns: 4-tuple containing: - result: False=failure, True=ok + result: false=failure, true=ok problems: List of problems, each a dict: 'type'; error or warning 'msg': text messageYou should probably limit the change to C code. :-)
Quoted 2 lines
Nice catch. I forgot Python use True and False. Will fix.
Omit tools/bddb/defs.php as well.
I'm still not clear what the policy should be regarding 3rd party libraries that are checked into u-boot, but my opinion is they should stay as close to the original source as much as possible, so we should exclude them from this cleanup:
lib/bzlib.c | 76 +++++----- lib/bzlib_decompress.c | 20 +-- lib/bzlib_huffman.c | 8 +- lib/bzlib_private.h | 3 - lib/lzma/LzmaDec.c | 2 +- lib/lzma/Types.h | 3 -
-Allen
Signature · 1 line
nvpublic
RFC PATCH v5 1/1 Consolidate bool type
In reply to York SunDear York Sun,
Quoted 7 lines · In message <[email protected]> you wrote:
'bool' is defined in random places. This patch consolidates them into a single header file
include/linux/types.h, usingstdbool.hintroduced 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.
This patch also includes some type conversions that are unrelated; these should be split off into a separate commit.
....
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c void fsl_serdes_init(void) · line 520
Quoted 10 lines
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +1
-1@@ -517,7 +517,7 @@ void fsl_serdes_init(void)size_t arglen;#endif #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES_A001 -int need_serdes_a001;/* TRUE == need work-around for SERDES A001 */ +bool need_serdes_a001;/* true == need work-around for SERDES A001 */
Like this one...
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It seems intuitively obvious to me, which means that it might be wrong. -- Chris Torek