[PATCH] kernel: Optimize unused integer return values

From: Li kunyu
Date: Wed Apr 27 2022 - 03:36:17 EST


Optimize unused integer return values

Signed-off-by: Li kunyu <kunyu@xxxxxxxxxxxx>
---
kernel/signal.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/signal.c b/kernel/signal.c
index 30cd1ca43bcd..ae58a966c8de 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -3464,7 +3464,7 @@ int __copy_siginfo_to_user32(struct compat_siginfo __user *to,
return 0;
}

-static int post_copy_siginfo_from_user32(kernel_siginfo_t *to,
+static void post_copy_siginfo_from_user32(kernel_siginfo_t *to,
const struct compat_siginfo *from)
{
clear_siginfo(to);
@@ -3548,7 +3548,8 @@ static int __copy_siginfo_from_user32(int signo, struct kernel_siginfo *to,
return -EFAULT;

from.si_signo = signo;
- return post_copy_siginfo_from_user32(to, &from);
+ post_copy_siginfo_from_user32(to, &from);
+ return 0;
}

int copy_siginfo_from_user32(struct kernel_siginfo *to,
@@ -3559,7 +3560,8 @@ int copy_siginfo_from_user32(struct kernel_siginfo *to,
if (copy_from_user(&from, ufrom, sizeof(struct compat_siginfo)))
return -EFAULT;

- return post_copy_siginfo_from_user32(to, &from);
+ post_copy_siginfo_from_user32(to, &from);
+ return 0;
}
#endif /* CONFIG_COMPAT */

--
2.18.2