Skip to contentSkip to conversation

: read_c0_* return always a long

PATCH New Juan Quintela 1 participant 1 message Dec 19, 2002 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : read_c0_* return always a long

Hi
this function returns a long, nuke a call to read_c0_errorepc and use right types for variables and printks.

Later, Juan.

Index: arch/mips/kernel/traps.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/kernel/traps.c,v retrieving revision 1.99.2.38

mips/kernel/traps.c +3 -3
diff -u -r1.99.2.38 traps.c
@@ -781,14 +781,14 @@
 
 asmlinkage void cache_parity_error(void)
 {
-	unsigned int reg_val;
+	unsigned long reg_val;
 
 	/* For the moment, report the problem and hang. */
 	reg_val = read_c0_errorepc();
 	printk("Cache error exception:\n");
-	printk("cp0_errorepc == %08x\n", read_c0_errorepc());
+	printk("cp0_errorepc == %08lx\n", reg_val);
 	reg_val = read_c0_cacheerr();
-	printk("c0_cacheerr == %08x\n", reg_val);
+	printk("c0_cacheerr == %08lx\n", reg_val);
 
 	printk("Decoded c0_cacheerr: %s cache fault in %s reference.\n",
 	       reg_val & (1<<30) ? "secondary" : "primary",
Signature · 2 lines
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy