All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Get rid of arch_free_page() warning
Date: Tue, 14 Dec 2004 20:14:00 +0000	[thread overview]
Message-ID: <16679.1103055240@redhat.com> (raw)


The attached patch gets rid of a warning produced when compiling
mm/page_alloc.c if the arch doesn't supply its own arch_free_page().

The problem is that there's one place in there that ignores the return value
of this function, and so you get a warning from gcc about an ineffectual
statement.

Signed-Off-By: David Howells <dhowells@redhat.com>
---
warthog>diffstat ../archfreepage-2610rc3.diff 
 gfp.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -uNr linux-2.6.10-rc3-mm1-mmcleanup/include/linux/gfp.h linux-2.6.10-rc3-mm1-misc/include/linux/gfp.h
--- linux-2.6.10-rc3-mm1-mmcleanup/include/linux/gfp.h	2004-12-13 17:34:21.000000000 +0000
+++ linux-2.6.10-rc3-mm1-misc/include/linux/gfp.h	2004-12-14 14:08:48.836858832 +0000
@@ -79,7 +79,10 @@
  * immediately bail: the arch-specific function has done all the work.
  */
 #ifndef HAVE_ARCH_FREE_PAGE
-#define arch_free_page(page, order) 0
+static inline int arch_free_page(struct page *page, unsigned int order)
+{
+	return 0;
+}
 #endif
 
 extern struct page *

                 reply	other threads:[~2004-12-14 20:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16679.1103055240@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --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.