diff options
author | 2025-02-27 08:22:07 +0100 | |
---|---|---|
committer | 2025-03-11 15:28:58 +0100 | |
commit | 8751b6e9e4abf3603b567e871768eb8cca8ef91a (patch) | |
tree | 733826d8c68c621d1086b06a8e80a1dfb82f0cc3 | |
parent | s390/vfio-ap: Notify userspace that guest's AP config changed when mdev removed (diff) | |
download | wireguard-linux-8751b6e9e4abf3603b567e871768eb8cca8ef91a.tar.xz wireguard-linux-8751b6e9e4abf3603b567e871768eb8cca8ef91a.zip |
s390/syscall: Simplify syscall_get_arguments()
Replace the while loop and if statement with a simple for loop
to make the code easier to understand.
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r-- | arch/s390/include/asm/syscall.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index 27e3d804b311..0213ec800b57 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h @@ -65,15 +65,13 @@ static inline void syscall_get_arguments(struct task_struct *task, unsigned long *args) { unsigned long mask = -1UL; - unsigned int n = 6; #ifdef CONFIG_COMPAT if (test_tsk_thread_flag(task, TIF_31BIT)) mask = 0xffffffff; #endif - while (n-- > 0) - if (n > 0) - args[n] = regs->gprs[2 + n] & mask; + for (int i = 1; i < 6; i++) + args[i] = regs->gprs[2 + i] & mask; args[0] = regs->orig_gpr2 & mask; } |