Re: [PATCH] 2.5.10 IDE 42

From: Dave Jones (davej@suse.de)
Date: Fri Apr 26 2002 - 12:31:21 EST


On Fri, Apr 26, 2002 at 06:09:11PM +0200, Pavel Machek wrote:

>
> > @@ -839,7 +834,7 @@
> > printk(", sector=%ld", HWGROUP(drive)->rq->sector);
> > }
> > }
> > -#endif /* FANCY_STATUS_DUMPS */
> > +#endif
> > printk("\n");
> > }
> > __restore_flags (flags); /* local CPU only */
>
> Here to. Comment after endif is good thing; you don't have to add it
> but you should certainly not kill it.

In cases where the #if is several pages before, or there multiple nested
#if's, I agree. But when the #if is just a few lines up with no other #if's
around, it's ugly.

We have functions elsewhere in the kernel like this..

void foo (void)
{
#if MY_MEMORY_SUCKS_BUT_LIKE_SILLY_COMMENTS
    one_line_of_code();
#endif /* MY_MEMORY_SUCKS_BUT_I_LIKE_SILLY_COMMENTS */
}

What information is this comment adding ?

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



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:13 EST