From: Andrew Morton - no externs in C. - avoid ifdefs-in-C. - Get the vmalloc_init() declaration's section right (sometimes it matters) Cc: Nick Piggin Cc: Jeremy Fitzhardinge Signed-off-by: Andrew Morton --- include/linux/vmalloc.h | 9 +++++++++ init/main.c | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff -puN include/linux/vmalloc.h~mm-rewrite-vmap-layer-fix include/linux/vmalloc.h --- a/include/linux/vmalloc.h~mm-rewrite-vmap-layer-fix +++ a/include/linux/vmalloc.h @@ -2,6 +2,7 @@ #define _LINUX_VMALLOC_H #include +#include #include /* pgprot_t */ struct vm_area_struct; /* vma defining user mapping in mm_types.h */ @@ -41,6 +42,14 @@ extern void *vm_map_ram(struct page **pa int node, pgprot_t prot); extern void vm_unmap_aliases(void); +#ifdef CONFIG_MMU +extern void __init vmalloc_init(void); +#else +static inline void vmalloc_init(void) +{ +} +#endif + extern void *vmalloc(unsigned long size); extern void *vmalloc_user(unsigned long size); extern void *vmalloc_node(unsigned long size, int node); diff -puN init/main.c~mm-rewrite-vmap-layer-fix init/main.c --- a/init/main.c~mm-rewrite-vmap-layer-fix +++ a/init/main.c @@ -91,9 +91,6 @@ extern void mca_init(void); extern void sbus_init(void); extern void prio_tree_init(void); extern void radix_tree_init(void); -#ifdef CONFIG_MMU -extern void vmalloc_init(void); -#endif extern void free_initmem(void); #ifdef CONFIG_ACPI extern void acpi_early_init(void); @@ -654,9 +651,6 @@ asmlinkage void __init start_kernel(void initrd_start = 0; } #endif -#ifdef CONFIG_MMU - vmalloc_init(); -#endif vfs_caches_init_early(); cpuset_init_early(); mem_init(); _