On Fri, Jan 18, 2008 at 08:41:22AM -0800, Linus Torvalds wrote:
>
>
> On Fri, 18 Jan 2008, [EMAIL PROTECTED] wrote:
> > */
> > +#ifdef __HAVE_ARCH_PTE_SPECIAL
> > +# define HAVE_PTE_SPECIAL 1
> > +#else
> > +# define HAVE_PTE_SPECIAL 0
> > +#endif
> > struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long
> > addr, pte_t pte)
> > {
> > - unsigned long pfn = pte_pfn(pte);
> > + unsigned long pfn;
> > +
> > + if (HAVE_PTE_SPECIAL) {
>
> I really don't think this is *any* different from "#ifdefs in code".
One fundamental difference is that with the above syntax we always
compile both versions of the code - so we do not end up with one
version that builds and another version that dont.
This has always striked me as a good reason to do the above and
I think it is busybox that does so with success.
Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html