lkml.org 
[lkml]   [2007]   [Dec]   [11]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 11 Dec 2007 09:54:23 +0100
FromIngo Molnar <>
SubjectRe: [PATCH 5/4] x86: fix up asm-x86/pgtable*.h formatting
* Christoph Hellwig <hch@infradead.org> wrote:

> On Mon, Dec 10, 2007 at 12:55:33PM -0800, Jeremy Fitzhardinge wrote:
> > +#define set_pte_atomic(pteptr, pteval)		set_pte(pteptr,pteval)
> > +#define set_pte_present(mm,addr,ptep,pteval)	set_pte_at(mm,addr,ptep,pteval)
> > 
> > +#define pte_clear(mm,addr,xp)				\
> > +	do {						\
> > +		set_pte_at(mm, addr, xp, __pte(0));	\
> > +	} while (0)
> > +
> >  #undef pmd_clear
> > +#define pmd_clear(xp)				\
> > +	do {					\
> > +		set_pmd(xp, __pmd(0));		\
> > +	} while (0)
> 
> What about turning these into inline functions to get better type 
> checking?

yes, please. That will also trigger and resolve any still present 
include file dependency mess. Macros are often used to hack around 
unclean include file layouts.

	Ingo


\
 
 \ /
  Last update: 2007-12-11 09:57    [from the cache]
©2003-2008