Message ID | 20200428123152.73566-1-mpe@ellerman.id.au (mailing list archive) |
---|---|
State | Accepted |
Commit | 24ac99e97fa7b8f0db9b48413a76def9cf73295c |
Headers | show |
Series | powerpc: Drop unneeded cast in task_pt_regs() | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (54dc28ff5e0b3585224d49a31b53e030342ca5c3) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Tue, 28 Apr 2020 22:31:52 +1000, Michael Ellerman wrote: > 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. Applied to powerpc/next. [1/1] powerpc: Drop unneeded cast in task_pt_regs() https://git.kernel.org/powerpc/c/24ac99e97fa7b8f0db9b48413a76def9cf73295c cheers
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index bfa336fbcfeb..8e855c78d780 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h @@ -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);
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> --- arch/powerpc/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)