mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Andi Kleen <ak@suse.de>
Cc: bibo.mao@intel.com,
	Linux Kernel ML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: [Patch]compile error of register_memory()
Date: Tue, 19 Dec 2006 22:41:30 +0900	[thread overview]
Message-ID: <20061219222812.683D.Y-GOTO@jp.fujitsu.com> (raw)

Hello.

register_memory() becomes double definition in 2.6.20-rc1.
It is defined in arch/i386/kernel/setup.c as static definition in
2.6.19.  But it is moved to arch/i386/kernel/e820.c in 2.6.20-rc1.
And same name function is defined in driver/base/memory.c too.
So, it becomes cause of compile error of duplicate definition if 
memory hotplug option is on.

This patch is to fix it. 

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>


---
 arch/i386/kernel/e820.c  |    2 +-
 arch/i386/kernel/setup.c |    2 +-
 include/asm-i386/e820.h  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6.20-rc1/arch/i386/kernel/e820.c
===================================================================
--- linux-2.6.20-rc1.orig/arch/i386/kernel/e820.c	2006-12-19 21:52:36.000000000 +0900
+++ linux-2.6.20-rc1/arch/i386/kernel/e820.c	2006-12-19 22:15:59.000000000 +0900
@@ -668,7 +668,7 @@
 	}
 }
 
-void __init register_memory(void)
+void __init e820_register_memory(void)
 {
 	unsigned long gapstart, gapsize, round;
 	unsigned long long last;
Index: linux-2.6.20-rc1/arch/i386/kernel/setup.c
===================================================================
--- linux-2.6.20-rc1.orig/arch/i386/kernel/setup.c	2006-12-19 21:52:36.000000000 +0900
+++ linux-2.6.20-rc1/arch/i386/kernel/setup.c	2006-12-19 22:15:59.000000000 +0900
@@ -639,7 +639,7 @@
 		get_smp_config();
 #endif
 
-	register_memory();
+	e820_register_memory();
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
Index: linux-2.6.20-rc1/include/asm-i386/e820.h
===================================================================
--- linux-2.6.20-rc1.orig/include/asm-i386/e820.h	2006-12-19 21:52:36.000000000 +0900
+++ linux-2.6.20-rc1/include/asm-i386/e820.h	2006-12-19 22:16:28.000000000 +0900
@@ -40,7 +40,7 @@
 			   unsigned type);
 extern void find_max_pfn(void);
 extern void register_bootmem_low_pages(unsigned long max_low_pfn);
-extern void register_memory(void);
+extern void e820_register_memory(void);
 extern void limit_regions(unsigned long long size);
 extern void print_memory_map(char *who);
 

-- 
Yasunori Goto 



                 reply	other threads:[~2006-12-19 14:02 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=20061219222812.683D.Y-GOTO@jp.fujitsu.com \
    --to=y-goto@jp.fujitsu.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=bibo.mao@intel.com \
    --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 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®