[U-Boot] [PATCH 2/3] fix checkpatch errors
JerryVanBaren
gerald.vanbaren at ge.com
Mon Sep 8 14:15:47 CEST 2008
Georg Schardt wrote:
> ---
> include/configs/FX12MM.h | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/configs/FX12MM.h b/include/configs/FX12MM.h
> index b47e403..8b8d41c 100644
> --- a/include/configs/FX12MM.h
> +++ b/include/configs/FX12MM.h
> @@ -15,28 +15,28 @@
> #define CONFIG_DOS_PARTITION 1
> #define CFG_SYSTEMACE_BASE XPAR_SYSACE_0_BASEADDR
> #define CFG_SYSTEMACE_WIDTH XPAR_SYSACE_0_MEM_WIDTH
> -#define ADD_SYSTEMACE_CMDS (| CFG_CMD_FAT)
> +#define ADD_SYSTEMACE_CMDS ( | CFG_CMD_FAT )
> #define RM_SYSTEMACE_CMDS
> #else
> #define ADD_SYSTEMACE_CMDS
> -#define RM_SYSTEMACE_CMDS | CFG_CMD_FAT
> +#define RM_SYSTEMACE_CMDS ( | CFG_CMD_FAT )
Dear List,
Philosophical question: is it better to put silly parenthesis around
#defines to make checkpatch shut up or to accept that checkpatch isn't
perfect and let it bitch about things that were done intentionally and
make sense per their usage?
(Yes, I see the first one already had () and the change is just fixing
the spacing.)
I'm serious about this question: in my day job I see a lot of mechanical
praying to the god of miserableC (MISRA-C) adding a HUGE amount of
unnecessary syntax noise such that it becomes hard to read the code
because of all the noise. I've had people at work ask me why "we"
cannot write code that is as easy to understand as the linux kernel.
The answer is simple: "we" are slavishly and mechanically following the
god of "if it was good practice somewhere, sometime, it must always be a
good practice" and not applying good engineering judgment and experience.
It is WRONG to let our tools rule us.[1]
Thanks for letting me unload,
gvb
[1] It took four movies to kill the Terminators, and now I see we still
haven't succeeded.
<http://en.wikipedia.org/wiki/Terminator_Salvation>
P.S. In my day job I've seen way too much lot of...
#define FOOBAR_THREE (3)
More information about the U-Boot
mailing list