powerpc/ptrace: Remove duplicate check from pt_regs_check()
authorDenis Efremov <efremov@linux.com>
Fri, 5 Mar 2021 11:28:07 +0000 (14:28 +0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Mar 2021 03:09:30 +0000 (14:09 +1100)
"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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210305112807.26299-1-efremov@linux.com
arch/powerpc/kernel/ptrace/ptrace.c

index 4f3d4ff..5180177 100644 (file)
@@ -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) !=