Re: [PATCH] 2.5.10 IDE 42

Dave Jones
2002-04-26T17:31:26Z

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