Skip to contentSkip to conversation

patch: mm/init.c warning

PATCH Kip Walker 2 participants 2 messages Apr 24, 2003 – Apr 26, 2003 MIPS

lore
Share & tools
lore

Kip Walker

author
#0 lore raw

I know I'm not the first to send something like this... can we please apply this warning fix for arch/mips/mm/init.c in the non-HIGHMEM case?

thanks,
Kip

Index: arch/mips/mm/init.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/mm/init.c,v
retrieving revision 1.38.2.11

mips/mm/init.c +5 -1
diff -u -r1.38.2.11 init.c
@@ -151,6 +151,7 @@
 extern char _ftext, _etext, _fdata, _edata;
 extern char __init_begin, __init_end;
 
+#ifdef CONFIG_HIGHMEM
 static void __init fixrange_init (unsigned long start, unsigned long end,
 	pgd_t *pgd_base)
 {
@@ -179,22 +180,25 @@
 		j = 0;
 	}
 }
+#endif
 
 void __init pagetable_init(void)
 {
+#ifdef CONFIG_HIGHMEM
 	unsigned long vaddr;
 	pgd_t *pgd, *pgd_base;
 	pmd_t *pmd;
 	pte_t *pte;
+#endif
 
 	/* Initialize the entire pgd.  */
 	pgd_init((unsigned long)swapper_pg_dir);
 	pgd_init((unsigned long)swapper_pg_dir +
 	         sizeof(pgd_t ) * USER_PTRS_PER_PGD);
 
+#ifdef CONFIG_HIGHMEM
 	pgd_base = swapper_pg_dir;
 
-#ifdef CONFIG_HIGHMEM
 	/*
 	 * Fixed mappings:
 	 */
#1 lore raw
Quoted 2 lines · Kip Walker

I know I'm not the first to send something like this... can we please apply this warning fix for arch/mips/mm/init.c in the non-HIGHMEM case?

I've applied the patch now - I just never liked it because it's an ugly #ifdef-o-manis ...

Ralf