mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rakib Mullick <rakib.mullick@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>
Subject: Re: [PATCH] hugetlb: Fix section mismatch warning in hugetlb.c
Date: Fri, 1 Jan 2010 20:52:18 +0600	[thread overview]
Message-ID: <b9df5fa11001010652j74b1208g20e28a31b08fb6ea@mail.gmail.com> (raw)
In-Reply-To: <20091230152958.9b6e174e.akpm@linux-foundation.org>

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

      reply	other threads:[~2010-01-01 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24  3:05 Rakib Mullick
2009-12-30 23:29 ` Andrew Morton
2010-01-01 14:52   ` Rakib Mullick [this message]

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=b9df5fa11001010652j74b1208g20e28a31b08fb6ea@mail.gmail.com \
    --to=rakib.mullick@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=lee.schermerhorn@hp.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®