Re: [PATCH] CONFIG_* In Comments Considered Harmful

From: Jörn Engel
Date: Wed Oct 01 2003 - 10:12:22 EST


On Wed, 1 October 2003 17:52:06 +0300, Muli Ben-Yehuda wrote:
> >
> > Index: include/linux/mm.h
> > ===================================================================
> > RCS file: /var/cvs/linux-2.6/include/linux/mm.h,v
> > retrieving revision 1.5
> > diff -u -p -r1.5 mm.h
> > --- a/include/linux/mm.h 28 Sep 2003 04:06:20 -0000 1.5
> > +++ b/include/linux/mm.h 1 Oct 2003 13:15:53 -0000
> > @@ -196,7 +196,7 @@ struct page {
> > #if defined(WANT_PAGE_VIRTUAL)
> > void *virtual; /* Kernel virtual address (NULL if
> > not kmapped, ie. highmem) */
> > -#endif /* CONFIG_HIGMEM || WANT_PAGE_VIRTUAL */
> > +#endif /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL */
> > };
>
> This is broken, the CONFIG_HIG(H)MEM shouldn't be there at all. Look
> at the #if defined(...) line.

include/linux/mm.h:353:
#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
include/linux/mm.h:199:
#endif /* CONFIG_HIGMEM || WANT_PAGE_VIRTUAL */

Ah, crud! The comment fits perfectly, it just sits at the wrong
position. Agreed, no comments are better than wrong comments.

Scrap my patch.

Jörn

--
A defeated army first battles and then seeks victory.
-- Sun Tzu
-
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/