Skip to content

Commit

Permalink
x86: replace hardcoded number
Browse files Browse the repository at this point in the history
Replace "4" in time_32.c code by sizeof(long).
This way, it can work on x86_64 too.

Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Glauber Costa authored and Ingo Molnar committed Oct 13, 2008
1 parent 461ebd1 commit 2c460d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kernel/time_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ unsigned long profile_pc(struct pt_regs *regs)
#ifdef CONFIG_SMP
if (!user_mode_vm(regs) && in_lock_functions(pc)) {
#ifdef CONFIG_FRAME_POINTER
return *(unsigned long *)(regs->bp + 4);
return *(unsigned long *)(regs->bp + sizeof(long));
#else
unsigned long *sp = (unsigned long *)&regs->sp;

Expand Down

0 comments on commit 2c460d0

Please sign in to comment.