* [PATCH] arch/s390/kernel: remove unneeded rc variable
@ 2022-01-18 7:51 cgel.zte
2022-01-18 9:15 ` Heiko Carstens
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-01-18 7:51 UTC (permalink / raw)
To: oleg
Cc: hca, gor, borntraeger, agordeev, linux-s390, 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/s390/kernel/ptrace.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index 0ea3d02b378d..2ac936ae7b2b 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -1048,16 +1048,13 @@ static int s390_vxrs_high_set(struct task_struct *target,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
- 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;
}
static int s390_system_call_get(struct task_struct *target,
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arch/s390/kernel: remove unneeded rc variable
2022-01-18 7:51 [PATCH] arch/s390/kernel: remove unneeded rc variable cgel.zte
@ 2022-01-18 9:15 ` Heiko Carstens
0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2022-01-18 9:15 UTC (permalink / raw)
To: cgel.zte
Cc: oleg, gor, borntraeger, agordeev, linux-s390, linux-kernel,
Minghao Chi, Zeal Robot
On Tue, Jan 18, 2022 at 07:51:15AM +0000, 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/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!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-18 9:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18 7:51 [PATCH] arch/s390/kernel: remove unneeded rc variable cgel.zte
2022-01-18 9:15 ` Heiko Carstens
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).