From: Mel Gorman On (25/07/07 15:49), Mel Gorman didst pronounce: > > SuperH allmodconfig blew up: > > > > mm/sparse.c: In function `sparse_init': > > mm/sparse.c:482: error: implicit declaration of function `sparse_early_usemap_alloc' > > mm/sparse.c:482: warning: assignment makes pointer from integer without a cast > > mm/sparse.c: In function `sparse_add_one_section': > > mm/sparse.c:553: error: implicit declaration of function `__kmalloc_section_usemap' > > mm/sparse.c:553: warning: assignment makes pointer from integer without a cast > > This error is due to a bad interaction between > generic-virtual-memmap-support-for-sparsemem.patch and > fix-corruption-of-memmap-on-ia64-sparsemem-when-mem_section-is-not-a-power-of-2.patch > . Functions that are needed whether CONFIG_SPARSEMEM_VMEMMAP is set are > not are depending on CONFIG_SPARSEMEM_VMEMMAP . This breaks on arch/sh > for example where SPARSEMEM may be set but not NUMA. > This patch only moves code and does not alter it. However, as SPARSEMEM is set without NUMA, the code move generates a warning on SuperH because NODE_DATA(nid) is a no-op. The following patch supresses the warning Signed-off-by: Mel Gorman Signed-off-by: Andrew Morton --- mm/sparse.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/sparse.c~fix-corruption-of-memmap-on-ia64-sparsemem-when-mem_section-is-not-a-power-of-2-fix-fix mm/sparse.c --- a/mm/sparse.c~fix-corruption-of-memmap-on-ia64-sparsemem-when-mem_section-is-not-a-power-of-2-fix-fix +++ a/mm/sparse.c @@ -251,6 +251,9 @@ static unsigned long *sparse_early_usema if (usemap) return usemap; + /* Stupid: suppress gcc warning for SPARSEMEM && !NUMA */ + nid = 0; + printk(KERN_WARNING "%s: allocation failed\n", __FUNCTION__); return NULL; } _