Re: [patch 1/5] x86: headers cleanup - boot.h

From: Cyrill Gorcunov
Date: Wed Jan 14 2009 - 16:20:55 EST


[Cyrill Gorcunov - Thu, Jan 15, 2009 at 12:11:42AM +0300]
| [Harvey Harrison - Wed, Jan 14, 2009 at 01:04:40PM -0800]
| | On Wed, 2009-01-14 at 23:37 +0300, Cyrill Gorcunov wrote:
| | > -#if (defined CONFIG_KERNEL_BZIP2)
| | > +#ifdef CONFIG_KERNEL_BZIP2
| | > #define BOOT_HEAP_SIZE 0x400000
| | > -#else
| | > +#else /* !CONFIG_KERNEL_BZIP2 */
| |
| | Curious, I haven't seen the #else comments with the extra ! before,
| | is that something that's coming into common use?
| |
| | Harvey
| |
|
| Actually I saw the both.
|
| ./arch/mips/include/asm/dec/prom.h:54:#else /* !CONFIG_64BIT */
| ./arch/mips/include/asm/dec/prom.h:58:#endif /* !CONFIG_64BIT */
|
| - Cyrill -

You know Harvey, I think such a details could be
mentioned in CodingStyle. At least I found two
types of comments:

1) Forward comments:

#if FOO
#else /* !FOO */
#endif /* !FOO */

2) Backward comments:

#if FOO
#else /* FOO */
#endif /* !FOO */

I prefer the first variant. But with any variant
I'm always rereading twice what is defined and
what is not :)

- Cyrill -
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/