diff options
| author | Sven Schnelle <svens@linux.ibm.com> | 2024-06-10 13:45:30 +0200 |
|---|---|---|
| committer | Vasily Gorbik <gor@linux.ibm.com> | 2024-06-18 17:01:33 +0200 |
| commit | 46c3031108e83a63007cf2f4c9a379875825e972 (patch) | |
| tree | 3e942c2e18a4fcee9628d224192c6d5c499a954d /arch/s390/include | |
| parent | eb28ec2b2e55c58148fa07eb994af11e6099e748 (diff) | |
s390/vtime: Remove duplicate get_lowcore() calls
Assign the output from get_lowcore() to a local variable,
so the code is easier to read.
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include')
| -rw-r--r-- | arch/s390/include/asm/vtime.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/s390/include/asm/vtime.h b/arch/s390/include/asm/vtime.h index ef4dd7d057a2..9d25fb35a042 100644 --- a/arch/s390/include/asm/vtime.h +++ b/arch/s390/include/asm/vtime.h @@ -4,16 +4,20 @@ static inline void update_timer_sys(void) { - get_lowcore()->system_timer += get_lowcore()->last_update_timer - get_lowcore()->exit_timer; - get_lowcore()->user_timer += get_lowcore()->exit_timer - get_lowcore()->sys_enter_timer; - get_lowcore()->last_update_timer = get_lowcore()->sys_enter_timer; + struct lowcore *lc = get_lowcore(); + + lc->system_timer += lc->last_update_timer - lc->exit_timer; + lc->user_timer += lc->exit_timer - lc->sys_enter_timer; + lc->last_update_timer = lc->sys_enter_timer; } static inline void update_timer_mcck(void) { - get_lowcore()->system_timer += get_lowcore()->last_update_timer - get_lowcore()->exit_timer; - get_lowcore()->user_timer += get_lowcore()->exit_timer - get_lowcore()->mcck_enter_timer; - get_lowcore()->last_update_timer = get_lowcore()->mcck_enter_timer; + struct lowcore *lc = get_lowcore(); + + lc->system_timer += lc->last_update_timer - lc->exit_timer; + lc->user_timer += lc->exit_timer - lc->mcck_enter_timer; + lc->last_update_timer = lc->mcck_enter_timer; } #endif /* _S390_VTIME_H */ |
