acpi: fix memory_hotplug externs
Subsystems (2)
PATCH 1/1 acpi: fix memory_hotplug externs
From: Randy Dunlap <[email protected]>
Spell CONFIG option correctly so that externs work.
Fixes these warnings:drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory' drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'
--- linsrc/linux-2616-mm2/include/linux/memory_hotplug.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h +1 -1
@@ -105,7 +105,7 @@ static inline int __remove_pages(struct }#if defined(CONFIG_MEMORY_HOTPLUG ) || defined(CONFIG_ACPI_HOTPLUG_MEMORY ) \ - || defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE ) + || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE )extern int add_memory (u64 start,u64 size);extern int remove_memory (u64 start,u64 size);#endif
---
Quoted 15 lines · Randy.Dunlap
From: Randy Dunlap <[email protected]>
Spell CONFIG option correctly so that externs work.
Fixes these warnings:drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'Signed-off-by Randy Dunlap <[email protected]>--- linsrc/linux-2616-mm2/include/linux/memory_hotplug.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h static inline int __remove_pages(struct · line 111
Quoted 8 lines
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h +1
-1@@ -105,7 +105,7 @@ static inline int __remove_pages(struct }#if defined(CONFIG_MEMORY_HOTPLUG ) || defined(CONFIG_ACPI_HOTPLUG_MEMORY ) \ - || defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE ) + || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE )extern int add_memory (u64 start,u64 size);extern int remove_memory (u64 start,u64 size);#endif
What about simply offering the prototypes unconditionally?
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 18 lines · On Sun, 2 Apr 2006 00:16:41 +0200 Adrian Bunk wrote:
Quoted 17 lines · Randy.Dunlap
From: Randy Dunlap <[email protected]>
Spell CONFIG option correctly so that externs work.
Fixes these warnings:drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'Signed-off-by Randy Dunlap <[email protected]>--- linsrc/linux-2616-mm2/include/linux/memory_hotplug.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)linsrc/linux-2616-mm2/include/linux/memory_hotplug.h +0
-0@@ -105,7 +105,7 @@ static inline int __remove_pages(struct }
Quoted 8 lines
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h static inline int __remove_pages(struct · line 111
Quoted 6 lines
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h +1
-1#if defined(CONFIG_MEMORY_HOTPLUG ) || defined(CONFIG_ACPI_HOTPLUG_MEMORY ) \ - || defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE ) + || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE )extern int add_memory (u64 start,u64 size);extern int remove_memory (u64 start,u64 size);#endif What about simply offering the prototypes unconditionally?
duh, yes, that should be OK AFAIK. Could you do that?
---
~Randy
PATCH 1/1 memory_hotplug.h: no need to #if guard the {add,remove}_memory() prototypes
Quoted 29 lines · Randy.Dunlap
Quoted 18 lines · On Sun, 2 Apr 2006 00:16:41 +0200 Adrian Bunk wrote:
Quoted 17 lines · Randy.Dunlap
From: Randy Dunlap <[email protected]>
Spell CONFIG option correctly so that externs work.
Fixes these warnings:drivers/acpi/acpi_memhotplug.c:248: warning: implicit declaration of function 'add_memory'drivers/acpi/acpi_memhotplug.c:312: warning: implicit declaration of function 'remove_memory'Signed-off-by Randy Dunlap <[email protected]>--- linsrc/linux-2616-mm2/include/linux/memory_hotplug.h | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)linsrc/linux-2616-mm2/include/linux/memory_hotplug.h +0
-0@@ -105,7 +105,7 @@ static inline int __remove_pages(struct }Quoted 8 lines
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h static inline int __remove_pages(struct · line 111
Quoted 6 lines
linsrc/linux-2616-mm2/include/linux/memory_hotplug.h +1
-1#if defined(CONFIG_MEMORY_HOTPLUG ) || defined(CONFIG_ACPI_HOTPLUG_MEMORY ) \ - || defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE ) + || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE )extern int add_memory (u64 start,u64 size);extern int remove_memory (u64 start,u64 size);#endif What about simply offering the prototypes unconditionally?
Quoted 1 line
duh, yes, that should be OK AFAIK. Could you do that?
Patch below.
Quoted 1 line
~Randy
cu
Adrian
<-- snip -->
We don't have to #if guard prototypes.
This also fixes a bug observed by Randy Dunlap due to a misspelled option in the #if (I haven't investigated whether it was harmless or might have caused runtime corruption).
include/linux/memory_hotplug.h renamed from include/linux/memory_hotplug.h.old +0 -3
@@ -104,10 +104,7 @@ return -ENOSYS; } -#if defined(CONFIG_MEMORY_HOTPLUG ) || defined(CONFIG_ACPI_HOTPLUG_MEMORY ) \ - || defined(CONFIG_ACPI_MEMORY_HOTPLUG_MODULE )extern int add_memory (u64 start,u64 size);extern int remove_memory (u64 start,u64 size); -#endif #endif /* __LINUX_MEMORY_HOTPLUG_H */