lkml.org 
[lkml]   [2003]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CONFIG_* In Comments Considered Harmful
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@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:49    [W:0.068 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site