Skip to contentSkip to conversation

arch: mm: Use str_write_read() helper in die_kernel_fault()

PATCH New Thorsten Blum 1 participant 1 message Oct 27, 2024 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: mm: Use str_write_read() helper in die_kernel_fault()

Remove hard-coded strings by using the str_write_read() helper function.

---
 arch/arm/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mm/fault.c +1 -1
index ab01b51de559..b2d59d260a1f 100644
@@ -136,7 +136,7 @@ static void die_kernel_fault(const char *msg, struct mm_struct *mm,
 	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");
+		 str_write_read(fsr & FSR_WRITE));
 
 	show_pte(KERN_ALERT, mm, addr);
 	die("Oops", regs, fsr);
Signature · 1 line
2.47.0