linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/13] Make user_regset_copyin_ignore() *void*
@ 2022-10-14 21:22 Sergey Shtylyov
  2022-10-14 21:22 ` [PATCH 11/13] sh: ptrace: user_regset_copyin_ignore() always returns 0 Sergey Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2022-10-14 21:22 UTC (permalink / raw)
  To: Oleg Nesterov, Russell King, Catalin Marinas, Will Deacon,
	Brian Cain, Thomas Bogendoerfer, Dinh Nguyen, Jonas Bonn,
	Stefan Kristiansson, Stafford Horne, James E.J. Bottomley,
	Helge Deller, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Yoshinori Sato, Rich Felker, David S. Miller,
	linux-arm-kernel, linux-hexagon, linux-ia64, linux-kernel,
	linux-mips, linux-parisc, linux-sh, linuxppc-dev, openrisc,
	sparclinux
  Cc: Andrew Morton, lvc-patches, lvc-project

Here are 13 patches against the 'next-20221014' tag of the 'linux-next.git'
repo.  I'm not sure how this cross-arch series should be merged -- perhaps
thru Andrew Morton's tree?

user_regset_copyin_ignore() apparently cannot fail and so always returns 0.
Let's first remove the result checks in several architectures that call this
function and then make user_regset_copyin_ignore() return *void* instead of
*int*...

Sergey Shtylyov (13):
  arc: ptrace: user_regset_copyin_ignore() always returns 0
  arm: ptrace: user_regset_copyin_ignore() always returns 0
  arm64: ptrace: user_regset_copyin_ignore() always returns 0
  hexagon: ptrace: user_regset_copyin_ignore() always returns 0
  ia64: ptrace: user_regset_copyin_ignore() always returns 0
  mips: ptrace: user_regset_copyin_ignore() always returns 0
  nios2: ptrace: user_regset_copyin_ignore() always returns 0
  openrisc: ptrace: user_regset_copyin_ignore() always returns 0
  parisc: ptrace: user_regset_copyin_ignore() always returns 0
  powerpc: ptrace: user_regset_copyin_ignore() always returns 0
  sh: ptrace: user_regset_copyin_ignore() always returns 0
  sparc: ptrace: user_regset_copyin_ignore() always returns 0
  regset: make user_regset_copyin_ignore() *void*

 arch/arc/kernel/ptrace.c                 |  2 +-
 arch/arm/kernel/ptrace.c                 |  8 +++-----
 arch/arm64/kernel/ptrace.c               | 16 ++++------------
 arch/hexagon/kernel/ptrace.c             |  7 +++----
 arch/ia64/kernel/ptrace.c                | 20 +++++++++-----------
 arch/mips/kernel/ptrace.c                |  9 +++++----
 arch/nios2/kernel/ptrace.c               |  6 +++---
 arch/openrisc/kernel/ptrace.c            |  8 +++-----
 arch/parisc/kernel/ptrace.c              | 15 +++++++++------
 arch/powerpc/kernel/ptrace/ptrace-tm.c   | 10 +++++-----
 arch/powerpc/kernel/ptrace/ptrace-view.c | 10 +++++-----
 arch/sh/kernel/ptrace_32.c               |  8 ++++----
 arch/sparc/kernel/ptrace_32.c            |  9 +++++----
 arch/sparc/kernel/ptrace_64.c            | 23 +++++++++++------------
 include/linux/regset.h                   | 15 +++++++--------
 15 files changed, 77 insertions(+), 89 deletions(-)

-- 
2.26.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 11/13] sh: ptrace: user_regset_copyin_ignore() always returns 0
  2022-10-14 21:22 [PATCH 00/13] Make user_regset_copyin_ignore() *void* Sergey Shtylyov
@ 2022-10-14 21:22 ` Sergey Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Shtylyov @ 2022-10-14 21:22 UTC (permalink / raw)
  To: Oleg Nesterov, Yoshinori Sato, Rich Felker, linux-sh, linux-kernel
  Cc: Andrew Morton

user_regset_copyin_ignore() always returns 0, so checking its result seems
pointless -- don't do this anymore...

Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
 arch/sh/kernel/ptrace_32.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index d417988d9770..36f50ad81e83 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -157,8 +157,8 @@ static int genregs_set(struct task_struct *target,
 					 offsetof(struct pt_regs, pc),
 					 sizeof(struct pt_regs));
 	if (!ret)
-		ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
-						sizeof(struct pt_regs), -1);
+		user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+					  sizeof(struct pt_regs), -1);
 
 	return ret;
 }
@@ -229,8 +229,8 @@ static int dspregs_set(struct task_struct *target,
 	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs,
 				 0, sizeof(struct pt_dspregs));
 	if (!ret)
-		ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
-						sizeof(struct pt_dspregs), -1);
+		user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+					  sizeof(struct pt_dspregs), -1);
 
 	return ret;
 }
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-14 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 21:22 [PATCH 00/13] Make user_regset_copyin_ignore() *void* Sergey Shtylyov
2022-10-14 21:22 ` [PATCH 11/13] sh: ptrace: user_regset_copyin_ignore() always returns 0 Sergey Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).