]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/mm: Get rid of fault type switch statements
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 22 Oct 2024 12:06:00 +0000 (14:06 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 29 Oct 2024 10:49:19 +0000 (11:49 +0100)
commita12d622ad541b5db0cda36cc7f3ac89b4f9e5a2c
tree87f80978ba483793970b74a5401d1ef0e5539481
parentf76901d16008862035265037905fd84364c3d0ac
s390/mm: Get rid of fault type switch statements

With GMAP_FAULT fault type gone, there are only KERNEL_FAULT and
USER_FAULT fault types left. Therefore there is no need for any fault
type switch statements left.

Rename get_fault_type() into is_kernel_fault() and let it return a
boolean value. Change all switch statements to if statements. This
removes quite a bit of code.

Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Link: https://lore.kernel.org/r/20241022120601.167009-11-imbrenda@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/mm/fault.c