lkml.org 
[lkml]   [2010]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH] hugetlb: Fix section mismatch warning in hugetlb.c
From
On 12/31/09, Andrew Morton <akpm@linux-foundation.org> wrote:
>
> I would be better to fix it the other way. AFACIT,
> hugetlb_register_node() and both versions of
> hugetlb_register_all_nodes() should be marked __init.
>

Okay. Thanks for suggestion.
-----
Since hugetlb_sysfs_add_hstate()'s ancestor function is from __init
and isn't referencing from any other function, so we can do it.


Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
---
--- linus/mm/hugetlb.c 2010-01-01 20:31:10.000000000 +0600
+++ rakib/mm/hugetlb.c 2010-01-01 20:26:58.000000000 +0600
@@ -1650,7 +1650,7 @@ static void hugetlb_unregister_all_nodes
* Register hstate attributes for a single node sysdev.
* No-op if attributes already registered.
*/
-void hugetlb_register_node(struct node *node)
+void __init hugetlb_register_node(struct node *node)
{
struct hstate *h;
struct node_hstate *nhs = &node_hstates[node->sysdev.id];
@@ -1683,7 +1683,7 @@ void hugetlb_register_node(struct node *
* sysdevs of nodes that have memory. All on-line nodes should have
* registered their associated sysdev by this time.
*/
-static void hugetlb_register_all_nodes(void)
+static void __init hugetlb_register_all_nodes(void)
{
int nid;

@@ -1712,7 +1712,7 @@ static struct hstate *kobj_to_node_hstat

static void hugetlb_unregister_all_nodes(void) { }

-static void hugetlb_register_all_nodes(void) { }
+static void __init hugetlb_register_all_nodes(void) { }

#endif

\
 
 \ /
  Last update: 2010-01-01 15:55    [from the cache]
©2003-2011 Jasper Spaans