linux-mips
[Top] [All Lists]

[PATCH] Fix some sparse warnings

To: linux-mips@linux-mips.org
Subject: [PATCH] Fix some sparse warnings
From: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Date: Sat, 26 Apr 2008 01:34:35 +0900 (JST)
Cc: ralf@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Fix some sparse warnings introduced by "[MIPS] Add support for MIPS
CMP platform." patch.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
Patch against linux-queue tree.

 arch/mips/kernel/traps.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 070f787..8686133 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -196,12 +196,12 @@ EXPORT_SYMBOL(dump_stack);
 static void show_code(unsigned int __user *pc)
 {
        long i;
-       unsigned short *pc16 = NULL;
+       unsigned short __user *pc16 = NULL;
 
        printk("\nCode:");
 
-       if ((unsigned int)pc & 1)
-               pc16 = (unsigned short *)((unsigned int)pc & ~1);
+       if ((unsigned long)pc & 1)
+               pc16 = (unsigned short __user *)((unsigned long)pc & ~1);
        for(i = -3 ; i < 6 ; i++) {
                unsigned int insn;
                if (pc16 ? __get_user(insn, pc16 + i) : __get_user(insn, pc + 
i)) {

<Prev in Thread] Current Thread [Next in Thread>