lkml.org 
[lkml]   [2002]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.5.10 IDE 42
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/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.259 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site