lkml.org 
[lkml]   [2006]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] unify pfn_to_page take 2 [1/25] generic funcs
Kyle McMartin wrote:
> On Wed, Feb 08, 2006 at 02:41:22PM +0900, KAMEZAWA Hiroyuki wrote:
>> +#ifndef CONFIG_ARCH_HAS_PFN_TO_PAGE
>> +/*
>
> 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.
>
I named the file as memory_model.h, so I placed it under linux/
But ,as you say, memory_model.h is entirely conditional on ARCH_HASH_PFN_TO_PAGE.
Can someone advise me ?

>> [...]
>> +#ifdef CONFIG_DONT_INLINE_PFN_TO_PAGE
>> +
>> +/* 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.
>
Ah, okay. thanks.

Regards,
-- Kame

-
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: 2006-02-08 08:21    [W:0.045 / U:1.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site