Re: [PATCH] unify pfn_to_page take 2 [1/25] generic funcs

From: Kyle McMartin
Date: Wed Feb 08 2006 - 02:00:07 EST

On Wed, Feb 08, 2006 at 02:41:22PM +0900, KAMEZAWA Hiroyuki wrote:
> +/*

Since this file is entirely conditionalized on ARCH_HAS_PFN_TO_PAGE,
might it be better to put this in asm-generic/ and include it from
an asm- header instead of adding yet another ARCH_HAS_ define?

This way, m68k (iirc?) could just not include that header, and not
worry about this define.

Then again, adding the include to every arches headers likely offsets
some of the C code reduction. However, it's still a win on the unified
definition and long term maintainability angle. Perhaps someone more
authoritative than little old me, could cast judgement on this.

> [...]
> +
> +/* not-inlined version for some archs. funcs are defined in
> mm/page_alloc.c */
> +extern unsigned long page_to_pfn(struct page *page);
> +extern struct page *pfn_to_page(unsigned long pfn);
> +
> +#else
> +

Commenting this #else might improve readability.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at