linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Palmer Dabbelt <palmer@dabbelt.com>
To: cgel.zte@gmail.com
Cc: oleg@redhat.com, Paul Walmsley <paul.walmsley@sifive.com>,
	aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org,
	linux-kernel@vger.kernel.org, chi.minghao@zte.com.cn,
	zealci@zte.com.cn, cgel.zte@gmail.com
Subject: Re: [PATCH] arch/riscv/kernel: remove redundant err variable
Date: Thu, 20 Jan 2022 10:56:50 -0800 (PST)	[thread overview]
Message-ID: <mhng-c795fe10-28e3-4762-92ae-0b8a99b58f96@palmer-ri-x1c9> (raw)
In-Reply-To: <20220112082729.667743-1-chi.minghao@zte.com.cn>

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.

      reply	other threads:[~2022-01-20 18:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12  8:27 [PATCH] arch/riscv/kernel: remove redundant err variable cgel.zte
2022-01-20 18:56 ` Palmer Dabbelt [this message]

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=mhng-c795fe10-28e3-4762-92ae-0b8a99b58f96@palmer-ri-x1c9 \
    --to=palmer@dabbelt.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=oleg@redhat.com \
    --cc=paul.walmsley@sifive.com \
    --cc=zealci@zte.com.cn \
    /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;
as well as URLs for NNTP newsgroup(s).