Skip to content

Commit

Permalink
[ARM] 3100/1: simplify a pointer computation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Russell King committed Nov 9, 2005
1 parent cbe69f9 commit c906107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c906107

Please sign in to comment.