Skip to content

Commit

Permalink
MIPS: Remove unused task_struct.trap_no field.
Browse files Browse the repository at this point in the history
It is initialized to zero and only ever read.  Remove it, and pass zero in
its place.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1531/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
David Daney authored and Ralf Baechle committed Aug 5, 2010
1 parent 9bb4d9d commit 7281cd2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions arch/mips/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ struct thread_struct {
unsigned long cp0_badvaddr; /* Last user fault */
unsigned long cp0_baduaddr; /* Last kernel fault accessing USEG */
unsigned long error_code;
unsigned long trap_no;
unsigned long irix_trampoline; /* Wheee... */
unsigned long irix_oldctx;
#ifdef CONFIG_CPU_CAVIUM_OCTEON
Expand Down Expand Up @@ -301,7 +300,6 @@ struct thread_struct {
.cp0_badvaddr = 0, \
.cp0_baduaddr = 0, \
.error_code = 0, \
.trap_no = 0, \
.irix_trampoline = 0, \
.irix_oldctx = 0, \
/* \
Expand Down
1 change: 0 additions & 1 deletion arch/mips/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ void output_thread_defines(void)
thread.cp0_baduaddr);
OFFSET(THREAD_ECODE, task_struct, \
thread.error_code);
OFFSET(THREAD_TRAPNO, task_struct, thread.trap_no);
OFFSET(THREAD_TRAMP, task_struct, \
thread.irix_trampoline);
OFFSET(THREAD_OLDCTX, task_struct, \
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void __noreturn die(const char * str, struct pt_regs * regs)
mips_mt_regdump(dvpret);
#endif /* CONFIG_MIPS_MT_SMTC */

if (notify_die(DIE_OOPS, str, regs, 0, current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
if (notify_die(DIE_OOPS, str, regs, 0, 0, SIGSEGV) == NOTIFY_STOP)
sig = 0;

printk("%s[#%d]:\n", str, ++die_counter);
Expand Down

0 comments on commit 7281cd2

Please sign in to comment.