powerpc: Drop unneeded cast in task_pt_regs()
authorMichael Ellerman <mpe@ellerman.id.au>
Tue, 28 Apr 2020 12:31:52 +0000 (22:31 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 15 May 2020 01:58:55 +0000 (11:58 +1000)
There's no need to cast in task_pt_regs() as tsk->thread.regs should
already be a struct pt_regs. If someone's using task_pt_regs() on
something that's not a task but happens to have a thread.regs then
we'll deal with them later.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200428123152.73566-1-mpe@ellerman.id.au
arch/powerpc/include/asm/processor.h

index a51964b..5ab2020 100644 (file)
@@ -306,7 +306,7 @@ struct thread_struct {
 }
 #endif
 
-#define task_pt_regs(tsk)      ((struct pt_regs *)(tsk)->thread.regs)
+#define task_pt_regs(tsk)      ((tsk)->thread.regs)
 
 unsigned long get_wchan(struct task_struct *p);