linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] avoid reference to struct page before it's declared
@ 2002-09-28 20:56 David Mosberger
  2002-09-30 14:44 ` Daniel Phillips
  0 siblings, 1 reply; 2+ messages in thread
From: David Mosberger @ 2002-09-28 20:56 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

GCC currently warns when page-flags.h gets included before struct page
is declared.  Patch below fixes this.

	--david
--
Interested in learning more about IA-64 Linux?  Try http://www.lia64.org/book/

===== include/linux/page-flags.h 1.21 vs edited =====
--- 1.21/include/linux/page-flags.h	Fri Sep 27 15:52:04 2002
+++ edited/include/linux/page-flags.h	Sat Sep 28 12:50:48 2002
@@ -211,6 +211,8 @@
 extern struct address_space swapper_space;
 #define PageSwapCache(page) ((page)->mapping == &swapper_space)
 
+struct page;	/* forward declaration */
+
 int test_clear_page_dirty(struct page *page);
 
 static inline void clear_page_dirty(struct page *page)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] avoid reference to struct page before it's declared
  2002-09-28 20:56 [patch] avoid reference to struct page before it's declared David Mosberger
@ 2002-09-30 14:44 ` Daniel Phillips
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Phillips @ 2002-09-30 14:44 UTC (permalink / raw)
  To: davidm, David Mosberger, torvalds; +Cc: linux-kernel

On Saturday 28 September 2002 22:56, David Mosberger wrote:
> GCC currently warns when page-flags.h gets included before struct page
> is declared.  Patch below fixes this.

A better way is to compile struct page and related structure definitions
right at the beginning of mm.h, before declaring any helper functions.  I
posted a patch to do this, earlier in 2.4, and should bring it forward.

-- 
Daniel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-30 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-28 20:56 [patch] avoid reference to struct page before it's declared David Mosberger
2002-09-30 14:44 ` Daniel Phillips

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).