linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arch: mm: Use str_write_read() helper in die_kernel_fault()
@ 2024-10-27 14:24 Thorsten Blum
  0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2024-10-27 14:24 UTC (permalink / raw)
  To: Russell King, Kees Cook, Russell King (Oracle), Andrew Morton,
	Ard Biesheuvel, Kefeng Wang, Linus Walleij, Suren Baghdasaryan,
	Yanjun Yang, Thorsten Blum
  Cc: linux-arm-kernel, linux-kernel

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

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/arm/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index ab01b51de559..b2d59d260a1f 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -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);
-- 
2.47.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-27 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-27 14:24 [PATCH] arch: mm: Use str_write_read() helper in die_kernel_fault() Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).