From: Wu Fengguang <fengguang.wu@intel.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andi Kleen <andi@firstfloor.org>,
"linux-next@vger.kernel.org" <linux-next@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Subject: Re: linux-next: build warning after merge of the final tree (hwpoison tree related)
Date: Mon, 27 Sep 2010 14:56:18 +0800 [thread overview]
Message-ID: <20100927065618.GA25631@localhost> (raw)
In-Reply-To: <20100927152804.57c2d66e.sfr@canb.auug.org.au>
Hi Stephen,
On Mon, Sep 27, 2010 at 01:28:04PM +0800, Stephen Rothwell wrote:
> Hi Andi,
>
> After merging the final tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> mm/hugetlb.c:2950: warning: 'is_hugepage_on_freelist' defined but not used
>
> Introduced by commit 19b31e29073e272e49a3d38972c132c49383d5d4 ("HWPOISON,
> hugetlb: add free check to dequeue_hwpoison_huge_page()").
Maybe ppc64_defconfig does not enable CONFIG_MEMORY_FAILURE.
Try this trivial patch :)
Thanks,
Fengguang
---
hugetlb: fix is_hugepage_on_freelist() build warning
mm/hugetlb.c:2950: warning: 'is_hugepage_on_freelist' defined but not used
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
mm/hugetlb.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- linux-next.orig/mm/hugetlb.c 2010-09-27 14:51:19.000000000 +0800
+++ linux-next/mm/hugetlb.c 2010-09-27 14:52:56.000000000 +0800
@@ -2876,8 +2876,8 @@ void hugetlb_unreserve_pages(struct inod
hugetlb_acct_memory(h, -(chg - freed));
}
-/* Should be called in hugetlb_lock */
-static int is_hugepage_on_freelist(struct page *hpage)
+#ifdef CONFIG_MEMORY_FAILURE
+static int __is_hugepage_on_freelist(struct page *hpage)
{
struct page *page;
struct page *tmp;
@@ -2890,7 +2890,6 @@ static int is_hugepage_on_freelist(struc
return 0;
}
-#ifdef CONFIG_MEMORY_FAILURE
/*
* This function is called from memory failure code.
* Assume the caller holds page lock of the head page.
@@ -2902,7 +2901,7 @@ int dequeue_hwpoisoned_huge_page(struct
int ret = -EBUSY;
spin_lock(&hugetlb_lock);
- if (is_hugepage_on_freelist(hpage)) {
+ if (__is_hugepage_on_freelist(hpage)) {
list_del(&hpage->lru);
h->free_huge_pages--;
h->free_huge_pages_node[nid]--;
next prev parent reply other threads:[~2010-09-27 6:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 5:28 linux-next: build warning after merge of the final tree (hwpoison tree related) Stephen Rothwell
2010-09-27 6:56 ` Wu Fengguang [this message]
2010-09-27 7:02 ` Andi Kleen
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=20100927065618.GA25631@localhost \
--to=fengguang.wu@intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=sfr@canb.auug.org.au \
/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.