lkml.org 
[lkml]   [2005]   [Nov]   [16]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 16 Nov 2005 18:04:25 +0900
FromKAMEZAWA Hiroyuki <>
SubjectRe: 2.6.14-mm2
I saw following errors while compilng with CONFIG_MEMORY_HOTPLUG=y.

==
drivers/base/memory.c:28: error: static declaration of 'memory_sysdev_class' follows non-static declaration
include/linux/memory.h:88: error: previous declaration of 'memory_sysdev_class' was here
drivers/base/memory.c:47: warning: initialization from incompatible pointer type
drivers/base/memory.c:54: error: static declaration of 'register_memory_notifier' follows non-static declaration
include/linux/memory.h:85: error: previous declaration of 'register_memory_notifier' was here
drivers/base/memory.c:59: error: static declaration of 'unregister_memory_notifier' follows non-static declaration
include/linux/memory.h:86: error: previous declaration of 'unregister_memory_notifier' was here
drivers/base/memory.c:69: error: static declaration of 'register_memory' follows non-static declaration
include/linux/memory.h:73: error: previous declaration of 'register_memory' was here
==

patch is attached.

-- Kame

Compile fix for /driver/base/memory.c

Signed-Off-by KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


Index: linux-2.6.14-mm2/drivers/base/memory.c
===================================================================
--- linux-2.6.14-mm2.orig/drivers/base/memory.c
+++ linux-2.6.14-mm2/drivers/base/memory.c
@@ -25,12 +25,12 @@

  #define MEMORY_CLASS_NAME	"memory"

-static struct sysdev_class memory_sysdev_class = {
+struct sysdev_class memory_sysdev_class = {
  	set_kset_name(MEMORY_CLASS_NAME),
  };
  EXPORT_SYMBOL(memory_sysdev_class);

-static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj)
+static const char *memory_hotplug_name(struct kset *kset, struct kobject *kobj)
  {
  	return MEMORY_CLASS_NAME;
  }
@@ -50,12 +50,12 @@ static struct kset_hotplug_ops memory_ho

  static struct notifier_block *memory_chain;

-static int register_memory_notifier(struct notifier_block *nb)
+int register_memory_notifier(struct notifier_block *nb)
  {
          return notifier_chain_register(&memory_chain, nb);
  }

-static void unregister_memory_notifier(struct notifier_block *nb)
+void unregister_memory_notifier(struct notifier_block *nb)
  {
          notifier_chain_unregister(&memory_chain, nb);
  }
@@ -63,7 +63,7 @@ static void unregister_memory_notifier(s
  /*
   * register_memory - Setup a sysfs device for a memory block
   */
-static int
+int
  register_memory(struct memory_block *memory, struct mem_section *section,
  		struct node *root)
  {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-11-16 10:07    [from the cache]
©2003-2008