]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ARM: 9456/1: mm: fault: use string choices helper
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 6 Aug 2025 23:20:26 +0000 (00:20 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 2 Oct 2025 07:44:43 +0000 (08:44 +0100)
We can use string choices helper, let's use it.
It makes one line code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/mm/fault.c

index 46169fe42c612152b38c029cd8b945fc113ff3e2..2bc828a1940c05ecfd5ab2c65b66bccf5b4de783 100644 (file)
@@ -135,8 +135,7 @@ static void die_kernel_fault(const char *msg, struct mm_struct *mm,
        bust_spinlocks(1);
        pr_alert("8<--- cut here ---\n");
        pr_alert("Unable to handle kernel %s at virtual address %08lx when %s\n",
-                msg, addr, fsr & FSR_LNX_PF ? "execute" :
-                fsr & FSR_WRITE ? "write" : "read");
+                msg, addr, fsr & FSR_LNX_PF ? "execute" : str_write_read(fsr & FSR_WRITE));
 
        show_pte(KERN_ALERT, mm, addr);
        die("Oops", regs, fsr);