arch/s390/kernel: remove unneeded rc variable
Subsystems (2)
PATCH 1/1 arch/s390/kernel: remove unneeded rc variable
From: Minghao Chi <[email protected]>
Return value from user_regset_copyin() directly instead of taking this in another redundant variable.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
Signed-off-by CGEL ZTE <[email protected]>
--- arch/s390/kernel/ptrace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
arch/s390/kernel/ptrace.c +1 -4
@@ -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,
Signature · 1 line
2.25.1
Heiko Carstens
maintainerQuoted 11 lines · On Tue, Jan 18, 2022 at 07:51:15AM +0000, [email protected] wrote:
From: Minghao Chi <[email protected]>
Return value from
user_regset_copyin()directly instead of taking this in another redundant variable.Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>Signed-off-by CGEL ZTE <[email protected]>--- arch/s390/kernel/ptrace.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
...
arch/s390/kernel/ptrace.c static int s390_vxrs_high_set(struct task_struct *target, · line 1060
Quoted 11 lines
arch/s390/kernel/ptrace.c +1
-4-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!