]> err.no Git - linux-2.6/commitdiff
[ARM] 3100/1: simplify a pointer computation
authorNicolas Pitre <nico@cam.org>
Wed, 9 Nov 2005 14:09:31 +0000 (14:09 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 9 Nov 2005 14:09:31 +0000 (14:09 +0000)
Patch from Nicolas Pitre

Looks clearer this way.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/process.c

index ba298277becde78687365206e86cdfcbe4936545..07fb744f8a680f69077356cb6f0a470758bf6324 100644 (file)
@@ -355,7 +355,7 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
        struct thread_info *thread = p->thread_info;
        struct pt_regs *childregs;
 
-       childregs = ((struct pt_regs *)((unsigned long)thread + THREAD_START_SP)) - 1;
+       childregs = (void *)thread + THREAD_START_SP - sizeof(*regs);
        *childregs = *regs;
        childregs->ARM_r0 = 0;
        childregs->ARM_sp = stack_start;