linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Remove unused task_struct.trap_no field.
@ 2010-08-03 21:57 David Daney
  2010-08-04 23:30 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: David Daney @ 2010-08-03 21:57 UTC (permalink / raw)
  To: linux-mips, ralf; +Cc: David Daney

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>
---
 arch/mips/include/asm/processor.h |    2 --
 arch/mips/kernel/asm-offsets.c    |    1 -
 arch/mips/kernel/traps.c          |    2 +-
 3 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/mips/include/asm/processor.h b/arch/mips/include/asm/processor.h
index 24d91f8..0d629bb 100644
--- a/arch/mips/include/asm/processor.h
+++ b/arch/mips/include/asm/processor.h
@@ -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
@@ -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,				\
 	/*							\
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index ca6c832..6b30fb2 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -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, \
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index fb6e93b..9d71774 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -388,7 +388,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);
-- 
1.7.1.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: Remove unused task_struct.trap_no field.
  2010-08-03 21:57 [PATCH] MIPS: Remove unused task_struct.trap_no field David Daney
@ 2010-08-04 23:30 ` Ralf Baechle
  2010-08-06  9:22   ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2010-08-04 23:30 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

Thanks, applied.

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: Remove unused task_struct.trap_no field.
  2010-08-04 23:30 ` Ralf Baechle
@ 2010-08-06  9:22   ` Ralf Baechle
  0 siblings, 0 replies; 3+ messages in thread
From: Ralf Baechle @ 2010-08-06  9:22 UTC (permalink / raw)
  To: David Daney; +Cc: linux-mips

On Thu, Aug 05, 2010 at 12:30:13AM +0100, Ralf Baechle wrote:

> Thanks, applied.

Btw, this field was unused since at least Linux 1.1.68, that is late 1994 :-)

  Ralf

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-06  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 21:57 [PATCH] MIPS: Remove unused task_struct.trap_no field David Daney
2010-08-04 23:30 ` Ralf Baechle
2010-08-06  9:22   ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).