powerpc: Drop unneeded cast in task_pt_regs()
Michael Ellerman
reviewerPATCH 1/1 powerpc: Drop unneeded cast in task_pt_regs()
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 <[email protected]>
--- arch/powerpc/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/include/asm/processor.h +1 -1
@@ -307,7 +307,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);
Signature · 1 line
2.25.1
Michael Ellerman
AppliedQuoted 4 lines · Michael Ellerman
There's no need to cast in
task_pt_regs()astsk->thread.regsshould already be a structpt_regs. If someone's usingtask_pt_regs()on something that's not a task but happens to have a thread.regs then we'll deal with them later.
Applied to powerpc/next.
[1/1] powerpc: Drop unneeded cast in task_pt_regs()
https://git.kernel.org/powerpc/c/24ac99e97fa7b8f0db9b48413a76def9cf73295c
cheers