Re: [PATCH] arch/s390/kernel: remove unneeded rc variable

From: Heiko Carstens
Date: Tue Jan 18 2022 - 04:15:42 EST


On Tue, Jan 18, 2022 at 07:51:15AM +0000, cgel.zte@xxxxxxxxx wrote:
> From: Minghao Chi <chi.minghao@xxxxxxxxxx>
>
> Return value from user_regset_copyin() directly instead
> of taking this in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: Minghao Chi <chi.minghao@xxxxxxxxxx>
> Signed-off-by: CGEL ZTE <cgel.zte@xxxxxxxxx>
> ---
> arch/s390/kernel/ptrace.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
...
> - int rc;
> -
> if (!MACHINE_HAS_VX)
> return -ENODEV;
> if (target == current)
> save_fpu_regs();
>
> - rc = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
> + return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
> target->thread.fpu.vxrs + __NUM_VXRS_LOW, 0, -1);
> - return rc;

This "breaks" indentation. Could you guys please stop sending such
semi-automated generated questionable patches? I really don't see any
benefit besides code churn, and the possibility of introducing bugs.

Thanks!