* [PATCH] arch/riscv/kernel: remove redundant err variable
@ 2022-01-12 8:27 cgel.zte
2022-01-20 18:56 ` Palmer Dabbelt
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-01-12 8:27 UTC (permalink / raw)
To: oleg
Cc: paul.walmsley, palmer, aou, linux-riscv, linux-kernel,
Minghao Chi, Zeal Robot, CGEL ZTE
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value from user_regset_copyin() directly instead
of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
arch/riscv/kernel/ptrace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index 9c0511119bad..a89243730153 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -42,12 +42,10 @@ static int riscv_gpr_set(struct task_struct *target,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
- int ret;
struct pt_regs *regs;
regs = task_pt_regs(target);
- ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
- return ret;
+ return user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
}
#ifdef CONFIG_FPU
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arch/riscv/kernel: remove redundant err variable
2022-01-12 8:27 [PATCH] arch/riscv/kernel: remove redundant err variable cgel.zte
@ 2022-01-20 18:56 ` Palmer Dabbelt
0 siblings, 0 replies; 2+ messages in thread
From: Palmer Dabbelt @ 2022-01-20 18:56 UTC (permalink / raw)
To: cgel.zte
Cc: oleg, Paul Walmsley, aou, linux-riscv, linux-kernel, chi.minghao,
zealci, cgel.zte
On Wed, 12 Jan 2022 00:27:29 PST (-0800), cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return value from user_regset_copyin() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
> ---
> arch/riscv/kernel/ptrace.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
> index 9c0511119bad..a89243730153 100644
> --- a/arch/riscv/kernel/ptrace.c
> +++ b/arch/riscv/kernel/ptrace.c
> @@ -42,12 +42,10 @@ static int riscv_gpr_set(struct task_struct *target,
> unsigned int pos, unsigned int count,
> const void *kbuf, const void __user *ubuf)
> {
> - int ret;
> struct pt_regs *regs;
>
> regs = task_pt_regs(target);
> - ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
> - return ret;
> + return user_regset_copyin(&pos, &count, &kbuf, &ubuf, regs, 0, -1);
> }
>
> #ifdef CONFIG_FPU
Thanks, this is on for-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-20 18:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 8:27 [PATCH] arch/riscv/kernel: remove redundant err variable cgel.zte
2022-01-20 18:56 ` Palmer Dabbelt
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).