public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH] m68k: sun3: Use str_read_write() helper in mmu_emu_handle_fault()
@ 2025-01-17 12:06 Thorsten Blum
  2025-01-20 15:41 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Blum @ 2025-01-17 12:06 UTC (permalink / raw)
  To: Sam Creasey, Geert Uytterhoeven; +Cc: Thorsten Blum, linux-m68k, linux-kernel

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

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/m68k/sun3/mmu_emu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c
index 119bd32efcfb..7b15cc12637b 100644
--- a/arch/m68k/sun3/mmu_emu.c
+++ b/arch/m68k/sun3/mmu_emu.c
@@ -17,6 +17,7 @@
 #include <linux/bitops.h>
 #include <linux/module.h>
 #include <linux/sched/mm.h>
+#include <linux/string_choices.h>
 
 #include <asm/setup.h>
 #include <asm/traps.h>
@@ -371,7 +372,7 @@ int mmu_emu_handle_fault (unsigned long vaddr, int read_flag, int kernel_fault)
 
 #ifdef DEBUG_MMU_EMU
 	pr_info("%s: vaddr=%lx type=%s crp=%p\n", __func__, vaddr,
-		read_flag ? "read" : "write", crp);
+		str_read_write(read_flag), crp);
 #endif
 
 	segment = (vaddr >> SUN3_PMEG_SIZE_BITS) & 0x7FF;
-- 
2.48.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] m68k: sun3: Use str_read_write() helper in mmu_emu_handle_fault()
  2025-01-17 12:06 [PATCH] m68k: sun3: Use str_read_write() helper in mmu_emu_handle_fault() Thorsten Blum
@ 2025-01-20 15:41 ` Geert Uytterhoeven
  2025-02-01 16:37   ` Thorsten Blum
  0 siblings, 1 reply; 3+ messages in thread
From: Geert Uytterhoeven @ 2025-01-20 15:41 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: Sam Creasey, linux-m68k, linux-kernel

Hi Thorsten,

On Fri, 17 Jan 2025 at 13:06, Thorsten Blum <thorsten.blum@linux.dev> wrote:
> Remove hard-coded strings by using the str_read_write() helper.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k tree for v6.15.

> --- a/arch/m68k/sun3/mmu_emu.c
> +++ b/arch/m68k/sun3/mmu_emu.c
> @@ -371,7 +372,7 @@ int mmu_emu_handle_fault (unsigned long vaddr, int read_flag, int kernel_fault)
>
>  #ifdef DEBUG_MMU_EMU
>         pr_info("%s: vaddr=%lx type=%s crp=%p\n", __func__, vaddr,
> -               read_flag ? "read" : "write", crp);
> +               str_read_write(read_flag), crp);

You haven't really tested this with DEBUG_MMU_EMU enabled, have you?
Fix sent.

>  #endif
>
>         segment = (vaddr >> SUN3_PMEG_SIZE_BITS) & 0x7FF;

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] m68k: sun3: Use str_read_write() helper in mmu_emu_handle_fault()
  2025-01-20 15:41 ` Geert Uytterhoeven
@ 2025-02-01 16:37   ` Thorsten Blum
  0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-02-01 16:37 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Sam Creasey, linux-m68k, linux-kernel

On 20. Jan 2025, at 16:41, Geert Uytterhoeven wrote:
>> --- a/arch/m68k/sun3/mmu_emu.c
>> +++ b/arch/m68k/sun3/mmu_emu.c
>> @@ -371,7 +372,7 @@ int mmu_emu_handle_fault (unsigned long vaddr, int read_flag, int kernel_fault)
>> 
>> #ifdef DEBUG_MMU_EMU
>>        pr_info("%s: vaddr=%lx type=%s crp=%p\n", __func__, vaddr,
>> -               read_flag ? "read" : "write", crp);
>> +               str_read_write(read_flag), crp);
> 
> You haven't really tested this with DEBUG_MMU_EMU enabled, have you?
> Fix sent.

Sorry, I missed this question.

I compile-tested it with DEBUG_MMU_EMU, but ignored the pr_info() error
you fixed in [1].

Thanks,
Thorsten

[1] https://lore.kernel.org/linux-kernel/b1d12a1d24b4aea9f98d905383ba932b2dc382e6.1737387419.git.geert@linux-m68k.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-01 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 12:06 [PATCH] m68k: sun3: Use str_read_write() helper in mmu_emu_handle_fault() Thorsten Blum
2025-01-20 15:41 ` Geert Uytterhoeven
2025-02-01 16:37   ` Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox