Re: [U-Boot] [RFC Patch v5] Consolidate bool type
On 01/24/2013 12:47:10 PM, York Sun wrote: diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index d831087..28b3240 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -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. 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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC Patch v5] Consolidate bool type
On 01/24/2013 11:09 AM, Scott Wood wrote: On 01/24/2013 12:47:10 PM, York Sun wrote: diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index d831087..28b3240 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -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. 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. :-) Nice catch. I forgot Python use True and False. Will fix. York ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC Patch v5] Consolidate bool type
On Thu, Jan 24, 2013 at 11:13:27AM -0800, York Sun wrote: On 01/24/2013 11:09 AM, Scott Wood wrote: On 01/24/2013 12:47:10 PM, York Sun wrote: diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index d831087..28b3240 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -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. 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. :-) 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 -- nvpublic ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [RFC Patch v5] Consolidate bool type
Dear York Sun, In message 1359053230-18920-1-git-send-email-york...@freescale.com you wrote: '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. This patch also includes some type conversions that are unrelated; these should be split off into a separate commit. diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c index 00e1c11..4caf3fd 100644 --- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c @@ -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 -- 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: w...@denx.de It seems intuitively obvious to me, which means that it might be wrong. -- Chris Torek ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot