parisc: ptrace: user_regset_copyin_ignore() always returns 0
authorSergey Shtylyov <s.shtylyov@omp.ru>
Fri, 14 Oct 2022 21:22:31 +0000 (00:22 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 15 Nov 2022 22:30:40 +0000 (14:30 -0800)
user_regset_copyin_ignore() always returns 0, so checking its result seems
pointless -- don't do this anymore...

Link: https://lkml.kernel.org/r/20221014212235.10770-10-s.shtylyov@omp.ru
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/parisc/kernel/ptrace.c

index 96ef6a6b66e5644d3f6c8a6078b364b7f021b36e..69c62933e9525d0680302698fc4682e0dedd91b7 100644 (file)
@@ -424,8 +424,9 @@ static int fpr_set(struct task_struct *target,
        ubuf = u;
        pos *= sizeof(reg);
        count *= sizeof(reg);
-       return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
-                                        ELF_NFPREG * sizeof(reg), -1);
+       user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+                                 ELF_NFPREG * sizeof(reg), -1);
+       return 0;
 }
 
 #define RI(reg) (offsetof(struct user_regs_struct,reg) / sizeof(long))
@@ -543,8 +544,9 @@ static int gpr_set(struct task_struct *target,
        ubuf = u;
        pos *= sizeof(reg);
        count *= sizeof(reg);
-       return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
-                                        ELF_NGREG * sizeof(reg), -1);
+       user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+                                 ELF_NGREG * sizeof(reg), -1);
+       return 0;
 }
 
 static const struct user_regset native_regsets[] = {
@@ -606,8 +608,9 @@ static int gpr32_set(struct task_struct *target,
        ubuf = u;
        pos *= sizeof(reg);
        count *= sizeof(reg);
-       return user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
-                                        ELF_NGREG * sizeof(reg), -1);
+       user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+                                 ELF_NGREG * sizeof(reg), -1);
+       return 0;
 }
 
 /*