From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] unify pfn_to_page take 2 [1/25] generic funcs
Date: Wed, 08 Feb 2006 16:20:22 +0900 [thread overview]
Message-ID: <43E99BB6.7040406@jp.fujitsu.com> (raw)
In-Reply-To: <20060208070031.GA21184@quicksilver.road.mcmartin.ca>
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
prev parent reply other threads:[~2006-02-08 7:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 5:41 [PATCH] unify pfn_to_page take 2 [1/25] generic funcs KAMEZAWA Hiroyuki
2006-02-08 7:00 ` Kyle McMartin
2006-02-08 7:20 ` KAMEZAWA Hiroyuki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43E99BB6.7040406@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kyle@mcmartin.ca \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.