mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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>
This commit is contained in:
parent
cbf367d5b0
commit
8751b6e9e4
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user