From: Andrew Morton <akpm@osdl.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, clameter@engr.sgi.com, apw@shadowen.org
Subject: Re: [RFC] [PATCH] virtual memmap on sparsemem v3 [3/4] static virtual mem_map
Date: Fri, 8 Dec 2006 19:33:23 -0800 [thread overview]
Message-ID: <20061208193323.8c5382c6.akpm@osdl.org> (raw)
In-Reply-To: <20061209114950.307d57ca.kamezawa.hiroyu@jp.fujitsu.com>
On Sat, 9 Dec 2006 11:49:50 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Fri, 8 Dec 2006 16:30:20 -0800
> Andrew Morton <akpm@osdl.org> wrote:
>
> > > +#ifdef CONFIG_SPARSEMEM_VMEMMAP_STATIC
> > > +#include <linux/mm_types.h>
> > > +extern struct page mem_map[];
> > > +#else
> > > extern struct page* mem_map;
> > > #endif
> > > +#endif
> >
> > This looks rather unpleasant - what went wrong here?
> >
> definition of 'struct page' is necessary before declearing array[]. (for gcc-4.0)
hm, OK, that declaration needs all of `struct page' in scope.
>
> > Would prefer to unconditionally include the header file - conditional inclusions
> > like this can cause compile failures when someone changes a config option. They
> > generally raise the complexity level.
> >
> Okay.
> Now, forward declearation of 'struct page' is in mmzone.h.
> I'll remove it and include mm_types.h instead of it.
> If someone says "Don't do that", I'll look for anothere way.
>
This header needs mm_types.h, so including it is certainly OK - there's no
choice. But I think it'd be better to include mm_types.h outside of any
ifdefs. Just stick the #include at the start of the file as usual.
next prev parent reply other threads:[~2006-12-09 3:34 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-08 6:56 [RFC] [PATCH] virtual memmap on sparsemem v3 [0/4] introduction KAMEZAWA Hiroyuki
2006-12-08 7:01 ` [RFC] [PATCH] virtual memmap on sparsemem v3 [1/4] map and unmap KAMEZAWA Hiroyuki
2006-12-09 0:28 ` Andrew Morton
2006-12-09 2:43 ` KAMEZAWA Hiroyuki
2006-12-09 4:52 ` KAMEZAWA Hiroyuki
2006-12-08 7:04 ` [RFC] [PATCH] virtual memmap on sparsemem v3 [2/4] generic virtual mem_map on sparsemem KAMEZAWA Hiroyuki
2006-12-09 12:05 ` Heiko Carstens
2006-12-09 13:17 ` KAMEZAWA Hiroyuki
2006-12-11 6:44 ` KAMEZAWA Hiroyuki
2006-12-08 7:07 ` [RFC] [PATCH] virtual memmap on sparsemem v3 [3/4] static virtual mem_map KAMEZAWA Hiroyuki
2006-12-09 0:30 ` Andrew Morton
2006-12-09 2:49 ` KAMEZAWA Hiroyuki
2006-12-09 3:33 ` Andrew Morton [this message]
2006-12-09 3:41 ` KAMEZAWA Hiroyuki
2006-12-09 4:53 ` KAMEZAWA Hiroyuki
2006-12-08 7:08 ` [RFC] [PATCH] virtual memmap on sparsemem v3 [4/4] ia64 support KAMEZAWA Hiroyuki
2006-12-09 4:55 ` KAMEZAWA Hiroyuki
2006-12-09 11:51 ` [RFC] [PATCH] virtual memmap on sparsemem v3 [0/4] introduction Heiko Carstens
2006-12-09 13:21 ` KAMEZAWA Hiroyuki
2006-12-10 19:47 ` Bob Picco
2006-12-11 0:43 ` KAMEZAWA Hiroyuki
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=20061208193323.8c5382c6.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=apw@shadowen.org \
--cc=clameter@engr.sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®