LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] microblaze: Improve data type of return variable
@ 2024-04-09 10:31 Thorsten Blum
  0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2024-04-09 10:31 UTC (permalink / raw
  To: Michal Simek, Andrew Morton, Hugh Dickins; +Cc: linux-kernel, Thorsten Blum

Since restore_sigcontext() returns an int and err is its return variable,
which can be negative, it should be of type int instead of unsigned int.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
---
 arch/microblaze/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index c78a0ff48066..51f718a42e2c 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -57,7 +57,7 @@ struct rt_sigframe {
 static int restore_sigcontext(struct pt_regs *regs,
 				struct sigcontext __user *sc, int *rval_p)
 {
-	unsigned int err = 0;
+	int err = 0;
 
 #define COPY(x)		{err |= __get_user(regs->x, &sc->regs.x); }
 	COPY(r0);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-09 10:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 10:31 [PATCH] microblaze: Improve data type of return variable Thorsten Blum

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 read-only IMAP folder(s) and NNTP newsgroup(s).