]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/m68k: fix build warning of unused variable
authorJiang Liu <liuj97@gmail.com>
Thu, 27 Jun 2013 23:52:07 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:53 +0000 (16:37 +1000)
Fix build warning of unused variable: arch/m68k/mm/init.c: In function
'mem_init': arch/m68k/mm/init.c:151:6: warning: unused variable 'i'
[-Wunused-variable]

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/m68k/mm/init.c

index 6e0a93869ec9fecee31751e02e43e95bfd3fca79..6b4baa6e4d31d8f24e09950d581f6ae9ab1cc6dd 100644 (file)
@@ -146,14 +146,11 @@ void __init print_memmap(void)
                MLK_ROUNDUP(__bss_start, __bss_stop));
 }
 
-void __init mem_init(void)
+static inline void init_pointer_tables(void)
 {
+#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
        int i;
 
-       /* this will put all memory onto the freelists */
-       free_all_bootmem();
-
-#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
        /* insert pointer tables allocated so far into the tablelist */
        init_pointer_table((unsigned long)kernel_pg_dir);
        for (i = 0; i < PTRS_PER_PGD; i++) {
@@ -165,7 +162,13 @@ void __init mem_init(void)
        if (zero_pgtable)
                init_pointer_table((unsigned long)zero_pgtable);
 #endif
+}
 
+void __init mem_init(void)
+{
+       /* this will put all memory onto the freelists */
+       free_all_bootmem();
+       init_pointer_tables();
        mem_init_print_info(NULL);
        print_memmap();
 }