diff mbox series

powerpc/ptrace: Remove duplicate check from pt_regs_check()

Message ID 20210305112807.26299-1-efremov@linux.com (mailing list archive)
State Accepted
Headers show
Series powerpc/ptrace: Remove duplicate check from pt_regs_check() | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (91966823812efbd175f904599e5cf2a854b39809)
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 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Denis Efremov March 5, 2021, 11:28 a.m. UTC
"offsetof(struct pt_regs, msr) == offsetof(struct user_pt_regs, msr)"
checked in pt_regs_check() twice in a row. Remove the second check.

Signed-off-by: Denis Efremov <efremov@linux.com>
---
 arch/powerpc/kernel/ptrace/ptrace.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael Ellerman March 31, 2021, 1:09 a.m. UTC | #1
On Fri, 5 Mar 2021 14:28:07 +0300, Denis Efremov wrote:
> "offsetof(struct pt_regs, msr) == offsetof(struct user_pt_regs, msr)"
> checked in pt_regs_check() twice in a row. Remove the second check.

Applied to powerpc/next.

[1/1] powerpc/ptrace: Remove duplicate check from pt_regs_check()
      https://git.kernel.org/powerpc/c/0b71b37241784c309bea6bd6a9d2027943c4ab94

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c
index 4f3d4ff3728c..51801777906c 100644
--- a/arch/powerpc/kernel/ptrace/ptrace.c
+++ b/arch/powerpc/kernel/ptrace/ptrace.c
@@ -354,8 +354,6 @@  void __init pt_regs_check(void)
 		     offsetof(struct user_pt_regs, nip));
 	BUILD_BUG_ON(offsetof(struct pt_regs, msr) !=
 		     offsetof(struct user_pt_regs, msr));
-	BUILD_BUG_ON(offsetof(struct pt_regs, msr) !=
-		     offsetof(struct user_pt_regs, msr));
 	BUILD_BUG_ON(offsetof(struct pt_regs, orig_gpr3) !=
 		     offsetof(struct user_pt_regs, orig_gpr3));
 	BUILD_BUG_ON(offsetof(struct pt_regs, ctr) !=