[Patch] mm: fix a section mismatch warning

Previous thread: Re: asm-generic/tlb.h and check_pgt_cache() by Adrian Bunk on Thursday, January 31, 2008 - 8:36 am. (1 message)

Next thread: 2.6.24 Page Allocation Failure by AndrewL733 on Thursday, January 31, 2008 - 8:49 am. (3 messages)
From: Alessandro Guido
Date: Thursday, January 31, 2008 - 8:48 am

Kconfig:

drivers/net/Kconfig:1743:warning: 'select' used by config symbol 'CPMAC' 
refers to undefined symbol 'FIXED_MII_100_FDX'
drivers/spi/Kconfig:156:warning: 'select' used by config symbol 'SPI_PXA2XX' 
refers to undefined symbol 'PXA_SSP'


Section mismatches:

WARNING: drivers/ata/built-in.o(.text+0x15b75): Section mismatch in reference 
from the function piix_init_one() to the 
function .devinit.text:piix_check_450nx_errata()
The function  piix_init_one() references
the function __devinit piix_check_450nx_errata().
This is often because piix_init_one lacks a __devinit 
annotation or the annotation of piix_check_450nx_errata is wrong.

WARNING: drivers/ata/built-in.o(.text+0x15c11): Section mismatch in reference 
from the function piix_init_one() to the 
function .devinit.text:piix_init_sata_map()
The function  piix_init_one() references
the function __devinit piix_init_sata_map().
This is often because piix_init_one lacks a __devinit 
annotation or the annotation of piix_init_sata_map is wrong.

WARNING: drivers/ata/built-in.o(.text+0x15c7d): Section mismatch in reference 
from the function piix_init_one() to the 
function .devinit.text:piix_init_pcs()
The function  piix_init_one() references
the function __devinit piix_init_pcs().
This is often because piix_init_one lacks a __devinit 
annotation or the annotation of piix_init_pcs is wrong.

WARNING: drivers/ata/built-in.o(.text+0x15c86): Section mismatch in reference 
from the function piix_init_one() to the 
function .devinit.text:piix_init_sidpr()
The function  piix_init_one() references
the function __devinit piix_init_sidpr().
This is often because piix_init_one lacks a __devinit 
annotation or the annotation of piix_init_sidpr is wrong.

WARNING: drivers/pci/built-in.o(.text+0xf3d): Section mismatch in reference 
from the function pci_add_new_bus() to the 
function .devinit.text:pci_alloc_child_bus()
The function  pci_add_new_bus() references
the function __devinit pci_alloc_child_bus().
This is ...
From: WANG Cong
Date: Thursday, January 31, 2008 - 10:25 am

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)
 {
--

From: Sam Ravnborg
Date: Thursday, January 31, 2008 - 11:38 am

Hi WANG.

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
--

From: WANG Cong
Date: Friday, February 1, 2008 - 3:30 am

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

OK. Thanks.

--

Previous thread: Re: asm-generic/tlb.h and check_pgt_cache() by Adrian Bunk on Thursday, January 31, 2008 - 8:36 am. (1 message)

Next thread: 2.6.24 Page Allocation Failure by AndrewL733 on Thursday, January 31, 2008 - 8:49 am. (3 messages)