From: Li kunyu <kunyu@nfschina.com>
To: ebiederm@xmission.com, keescook@chromium.org, tglx@linutronix.de,
elver@google.com
Cc: oleg@redhat.com, legion@kernel.org, linux-kernel@vger.kernel.org,
Li kunyu <kunyu@nfschina.com>
Subject: [PATCH] kernel: Optimize unused integer return values
Date: Wed, 27 Apr 2022 15:34:48 +0800 [thread overview]
Message-ID: <20220427073448.10730-1-kunyu@nfschina.com> (raw)
Optimize unused integer return values
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
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
next reply other threads:[~2022-04-27 7:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-27 7:34 Li kunyu [this message]
2022-04-27 7:47 ` Marco Elver
2022-04-28 1:59 ` kernel test robot
2022-04-27 8:54 Li kunyu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220427073448.10730-1-kunyu@nfschina.com \
--to=kunyu@nfschina.com \
--cc=ebiederm@xmission.com \
--cc=elver@google.com \
--cc=keescook@chromium.org \
--cc=legion@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®