ptrace: cleanup arch_ptrace() on tile
authorNamhyung Kim <namhyung@gmail.com>
Wed, 27 Oct 2010 22:34:04 +0000 (15:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Oct 2010 01:03:12 +0000 (18:03 -0700)
Remove checking @addr less than 0 because @addr is now unsigned.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/tile/kernel/ptrace.c

index f634729211d12f7a5b01437b176d83846ccb1034..9cd29884c09f2bfec1cddbacb67579bbd1e821c6 100644 (file)
@@ -58,7 +58,7 @@ long arch_ptrace(struct task_struct *child, long request,
        switch (request) {
 
        case PTRACE_PEEKUSR:  /* Read register from pt_regs. */
-               if (addr < 0 || addr >= PTREGS_SIZE)
+               if (addr >= PTREGS_SIZE)
                        break;
                childreg = (char *)task_pt_regs(child) + addr;
 #ifdef CONFIG_COMPAT
@@ -77,7 +77,7 @@ long arch_ptrace(struct task_struct *child, long request,
                break;
 
        case PTRACE_POKEUSR:  /* Write register in pt_regs. */
-               if (addr < 0 || addr >= PTREGS_SIZE)
+               if (addr >= PTREGS_SIZE)
                        break;
                childreg = (char *)task_pt_regs(child) + addr;
 #ifdef CONFIG_COMPAT