Skip to content

Commit

Permalink
kernel: Optimize unused integer return values
Browse files Browse the repository at this point in the history
Optimize unused integer return values

Signed-off-by: Li kunyu <kunyu@nfschina.com>
  • Loading branch information
likunyur authored and intel-lab-lkp committed Apr 27, 2022
1 parent 8126b1c commit ddb369a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kernel/signal.c
Expand Up @@ -3461,7 +3461,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);
Expand Down Expand Up @@ -3545,7 +3545,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,
Expand All @@ -3556,7 +3557,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 */

Expand Down

0 comments on commit ddb369a

Please sign in to comment.