lkml.org 
[lkml]   [2010]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 22/24] ptrace: cleanup arch_ptrace() on tile
Date
Remove checking @addr less than 0 because @addr is now unsigned.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
---
arch/tile/kernel/ptrace.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/tile/kernel/ptrace.c b/arch/tile/kernel/ptrace.c
index aed9256..704bf11 100644
--- a/arch/tile/kernel/ptrace.c
+++ b/arch/tile/kernel/ptrace.c
@@ -85,7 +85,7 @@ long arch_ptrace(struct task_struct *child, long request,
case PTRACE_PEEKUSR: /* Read register from pt_regs. */
if (addr & (sizeof(data)-1))
break;
- if (addr < 0 || addr >= PTREGS_SIZE)
+ if (addr >= PTREGS_SIZE)
break;
tmp = getreg(child, addr); /* Read register */
ret = put_user(tmp, datap);
@@ -94,7 +94,7 @@ long arch_ptrace(struct task_struct *child, long request,
case PTRACE_POKEUSR: /* Write register in pt_regs. */
if (addr & (sizeof(data)-1))
break;
- if (addr < 0 || addr >= PTREGS_SIZE)
+ if (addr >= PTREGS_SIZE)
break;
putreg(child, addr, data); /* Write register */
ret = 0;
--
1.7.2.2


\
 
 \ /
  Last update: 2010-09-02 18:21    [from the cache]
©2003-2011 Jasper Spaans