linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] mm: fix a section mismatch warning
       [not found] <200801311648.43389.alessandro.guido@gmail.com>
@ 2008-01-31 17:25 ` WANG Cong
  2008-01-31 18:38   ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: WANG Cong @ 2008-01-31 17:25 UTC (permalink / raw)
  To: Alessandro Guido; +Cc: linux-kernel, Sam Ravnborg, linux-kbuild


This patch fix this mismatch warning from mm:

WARNING: vmlinux.o(.meminit.text+0x37f): Section mismatch in reference from the function free_area_init_core() to the function .init.text:setup_usemap()
modpost: Found 1 section mismatch(es).

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>

---

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index b2838c2..8a9ae3c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3321,7 +3321,7 @@ static inline int pageblock_default_order(unsigned int order)
  *   - mark all memory queues empty
  *   - clear the memory bitmaps
  */
-static void __meminit free_area_init_core(struct pglist_data *pgdat,
+static void __init free_area_init_core(struct pglist_data *pgdat,
 		unsigned long *zones_size, unsigned long *zholes_size)
 {
 	enum zone_type j;
@@ -3445,7 +3445,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
 #endif /* CONFIG_FLAT_NODE_MEM_MAP */
 }
 
-void __meminit free_area_init_node(int nid, struct pglist_data *pgdat,
+void __init free_area_init_node(int nid, struct pglist_data *pgdat,
 		unsigned long *zones_size, unsigned long node_start_pfn,
 		unsigned long *zholes_size)
 {

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] mm: fix a section mismatch warning
  2008-01-31 17:25 ` [Patch] mm: fix a section mismatch warning WANG Cong
@ 2008-01-31 18:38   ` Sam Ravnborg
  2008-02-01 10:30     ` WANG Cong
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2008-01-31 18:38 UTC (permalink / raw)
  To: WANG Cong; +Cc: Alessandro Guido, linux-kernel, linux-kbuild

Hi WANG.

On Fri, Feb 01, 2008 at 01:25:17AM +0800, WANG Cong wrote:
> 
> This patch fix this mismatch warning from mm:
> 
> WARNING: vmlinux.o(.meminit.text+0x37f): Section mismatch in reference from the function free_area_init_core() to the function .init.text:setup_usemap()
> modpost: Found 1 section mismatch(es).
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
> 
> ---
> 
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index b2838c2..8a9ae3c 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -3321,7 +3321,7 @@ static inline int pageblock_default_order(unsigned int order)
>   *   - mark all memory queues empty
>   *   - clear the memory bitmaps
>   */
> -static void __meminit free_area_init_core(struct pglist_data *pgdat,
> +static void __init free_area_init_core(struct pglist_data *pgdat,
>  		unsigned long *zones_size, unsigned long *zholes_size)
>  {
>  	enum zone_type j;
> @@ -3445,7 +3445,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
>  #endif /* CONFIG_FLAT_NODE_MEM_MAP */
>  }
>  
> -void __meminit free_area_init_node(int nid, struct pglist_data *pgdat,
> +void __init free_area_init_node(int nid, struct pglist_data *pgdat,
This change make me a bit unnerved. HAve you checked all callers?
I simple grep shows 46 hits in the tree.

It is always good to explain why the change you do is OK,
for no other reasons than to show you really thought it through.

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] mm: fix a section mismatch warning
  2008-01-31 18:38   ` Sam Ravnborg
@ 2008-02-01 10:30     ` WANG Cong
  0 siblings, 0 replies; 3+ messages in thread
From: WANG Cong @ 2008-02-01 10:30 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: WANG Cong, Alessandro Guido, linux-kernel, linux-kbuild

On Thu, Jan 31, 2008 at 07:38:53PM +0100, Sam Ravnborg wrote:
>Hi WANG.
>
>On Fri, Feb 01, 2008 at 01:25:17AM +0800, WANG Cong wrote:
>> 
>> This patch fix this mismatch warning from mm:
>> 
>> WARNING: vmlinux.o(.meminit.text+0x37f): Section mismatch in reference from the function free_area_init_core() to the function .init.text:setup_usemap()
>> modpost: Found 1 section mismatch(es).
>> 
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>> 
>> ---
>> 
>> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
>> index b2838c2..8a9ae3c 100644
>> --- a/mm/page_alloc.c
>> +++ b/mm/page_alloc.c
>> @@ -3321,7 +3321,7 @@ static inline int pageblock_default_order(unsigned int order)
>>   *   - mark all memory queues empty
>>   *   - clear the memory bitmaps
>>   */
>> -static void __meminit free_area_init_core(struct pglist_data *pgdat,
>> +static void __init free_area_init_core(struct pglist_data *pgdat,
>>  		unsigned long *zones_size, unsigned long *zholes_size)
>>  {
>>  	enum zone_type j;
>> @@ -3445,7 +3445,7 @@ static void __init_refok alloc_node_mem_map(struct pglist_data *pgdat)
>>  #endif /* CONFIG_FLAT_NODE_MEM_MAP */
>>  }
>>  
>> -void __meminit free_area_init_node(int nid, struct pglist_data *pgdat,
>> +void __init free_area_init_node(int nid, struct pglist_data *pgdat,
>This change make me a bit unnerved. HAve you checked all callers?
>I simple grep shows 46 hits in the tree.

I use cscope to do the check. ;)

free_area_init_node is the only caller of free_area_init_core,
but free_area_init_node has more than one callers that didn't
mark __init/__meminit.

>
>It is always good to explain why the change you do is OK,
>for no other reasons than to show you really thought it through.

OK. Thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-01 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200801311648.43389.alessandro.guido@gmail.com>
2008-01-31 17:25 ` [Patch] mm: fix a section mismatch warning WANG Cong
2008-01-31 18:38   ` Sam Ravnborg
2008-02-01 10:30     ` WANG Cong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).