From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Andi Kleen <ak@linux.intel.com>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jun'ichi Nomura" <j-nomura@ce.jp.nec.com>
Subject: Re: linux-next: build failure after merge of the final tree (hwpoison tree related)
Date: Thu, 30 Sep 2010 11:54:51 +0900 [thread overview]
Message-ID: <20100930025451.GB10142@spritzera.linux.bs1.fc.nec.co.jp> (raw)
In-Reply-To: <20100927155551.2e4e4b26.sfr@canb.auug.org.au>
Hi,
On Mon, Sep 27, 2010 at 03:55:51PM +1000, Stephen Rothwell wrote:
> Hi Andi,
>
> After merging the final tree, today's linux-next build (powerpc allnoconfig)
> failed like this:
>
> mm/mprotect.o: In function `migrate_huge_page_move_mapping':
> mprotect.c:(.text+0x0): multiple definition of `migrate_huge_page_move_mapping'
> mm/shmem.o:shmem.c:(.text+0x0): first defined here
> mm/rmap.o: In function `migrate_huge_page_move_mapping':
> rmap.c:(.text+0x0): multiple definition of `migrate_huge_page_move_mapping'
> mm/shmem.o:shmem.c:(.text+0x0): first defined here
>
> Caused by commit 7b217c52ce7f33379beb27aa7685109fa74ed6bf ("hugetlb:
> hugepage migration core").
>
> This function is declared as "extern int ..." with a body in
> include/linux/migrate.h for the non CONFIG_MIGRATION case.
This build error reappears for x86_64 with !CONFIG_MIGRATION.
As you commented, "extern int" declaration causes it.
So please apply the following patch.
Thank you for reporting.
Thanks,
Naoya Horiguchi
---
Date: Thu, 30 Sep 2010 09:56:02 +0900
Subject: [PATCH] fix build error with !CONFIG_MIGRATION
migrate_huge_page_move_mapping() is declared as "extern int ..."
in include/linux/migrate.h for !CONFIG_MIGRATION,
which causes the build error like below:
mm/mprotect.o: In function `migrate_huge_page_move_mapping':
mprotect.c:(.text+0x0): multiple definition of `migrate_huge_page_move_mapping'
mm/shmem.o:shmem.c:(.text+0x0): first defined here
mm/rmap.o: In function `migrate_huge_page_move_mapping':
rmap.c:(.text+0x0): multiple definition of `migrate_huge_page_move_mapping'
mm/shmem.o:shmem.c:(.text+0x0): first defined here
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
---
include/linux/migrate.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/migrate.h b/include/linux/migrate.h
index 3c1941e..085527f 100644
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -50,7 +50,7 @@ static inline int migrate_vmas(struct mm_struct *mm,
static inline void migrate_page_copy(struct page *newpage,
struct page *page) {}
-extern int migrate_huge_page_move_mapping(struct address_space *mapping,
+static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
struct page *newpage, struct page *page)
{
return -ENOSYS;
--
1.7.2.3
prev parent reply other threads:[~2010-09-30 2:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 5:55 Stephen Rothwell
2010-09-29 2:57 ` Stephen Rothwell
2010-10-03 23:36 ` Stephen Rothwell
2010-09-30 2:54 ` Naoya Horiguchi [this message]
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=20100930025451.GB10142@spritzera.linux.bs1.fc.nec.co.jp \
--to=n-horiguchi@ah.jp.nec.com \
--cc=ak@linux.intel.com \
--cc=j-nomura@ce.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--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 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®