lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061208193323.8c5382c6.akpm@osdl.org>
Date:	Fri, 8 Dec 2006 19:33:23 -0800
From:	Andrew Morton <akpm@...l.org>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org, clameter@...r.sgi.com,
	apw@...dowen.org
Subject: Re: [RFC] [PATCH] virtual memmap on sparsemem v3 [3/4] static
 virtual mem_map

On Sat, 9 Dec 2006 11:49:50 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:

> On Fri, 8 Dec 2006 16:30:20 -0800
> Andrew Morton <akpm@...l.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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ