[Patch] Fix unnecesary meminit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > It doesn't make a lot of sense to export an __init symbol to modules.  I
> > guess it's OK in this case, but we get warnings:
> 
> It seems wrong to me to first tell linker to discard the code after init and
> next to export the symbol to make it available for any module anytime.
> 
> Both function are relatively small so better avoid playing games and
> drop the __meminit tag.

Ok. This is the patch.


-------
This is to fix unnecessary __meminit definition.
These are exported for kernel modules.

I compiled on ia64/x86-64 with memory hotplug on/off.

Signed-off-by: Yasunori Goto <[email protected]>

 drivers/acpi/numa.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.21-mm1/drivers/acpi/numa.c
===================================================================
--- linux-2.6.21-mm1.orig/drivers/acpi/numa.c	2007-05-08 19:33:05.000000000 +0900
+++ linux-2.6.21-mm1/drivers/acpi/numa.c	2007-05-08 19:33:12.000000000 +0900
@@ -228,7 +228,7 @@ int __init acpi_numa_init(void)
 	return 0;
 }
 
-int __meminit acpi_get_pxm(acpi_handle h)
+int acpi_get_pxm(acpi_handle h)
 {
 	unsigned long pxm;
 	acpi_status status;
@@ -246,7 +246,7 @@ int __meminit acpi_get_pxm(acpi_handle h
 }
 EXPORT_SYMBOL(acpi_get_pxm);
 
-int __meminit acpi_get_node(acpi_handle *handle)
+int acpi_get_node(acpi_handle *handle)
 {
 	int pxm, node = -1;
 

-- 
Yasunori Goto 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux