mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Rakib Mullick <rakib.mullick@gmail.com>
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: Wed, 30 Dec 2009 15:29:58 -0800	[thread overview]
Message-ID: <20091230152958.9b6e174e.akpm@linux-foundation.org> (raw)
In-Reply-To: <b9df5fa10912231905t69502923gee5aaf1c1b2efa6a@mail.gmail.com>

On Thu, 24 Dec 2009 09:05:48 +0600
Rakib Mullick <rakib.mullick@gmail.com> wrote:

>     The patch titled hugetlb-add-per-node-hstate-attributes.patch introduces
>  the following section mismatch warning, due to a reference form non-init
> function hugetlb_register_node to a init function hugetlb_sysfs_add_hstate.
> 
> LD      mm/built-in.o
> WARNING: mm/built-in.o(.text+0x5396d): Section mismatch in reference
> from the function hugetlb_register_node() to the function
> .init.text:hugetlb_sysfs_add_hstate()
> The function hugetlb_register_node() references
> the function __init hugetlb_sysfs_add_hstate().
> This is often because hugetlb_register_node lacks a __init
> annotation or the annotation of hugetlb_sysfs_add_hstate is wrong.
> 
> ---
> Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
> 
> --- linus/mm/hugetlb.c	2009-12-18 15:52:35.000000000 +0600
> +++ rakib/mm/hugetlb.c	2009-12-23 20:37:16.000000000 +0600
> @@ -1515,7 +1515,7 @@ static struct attribute_group hstate_att
>  	.attrs = hstate_attrs,
>  };
> 
> -static int __init hugetlb_sysfs_add_hstate(struct hstate *h,
> +static int hugetlb_sysfs_add_hstate(struct hstate *h,
>  				struct kobject *parent,
>  				struct kobject **hstate_kobjs,
>  				struct attribute_group *hstate_attr_group)

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.


  reply	other threads:[~2009-12-30 23:30 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 [this message]
2010-01-01 14:52   ` Rakib Mullick

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=20091230152958.9b6e174e.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rakib.mullick@gmail.com \
    /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

Powered by JetHome