* [PATCH] MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env()
@ 2025-01-15 9:01 Thorsten Blum
2025-01-20 19:41 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-01-15 9:01 UTC (permalink / raw)
To: Huacai Chen, Jiaxun Yang, Thomas Bogendoerfer
Cc: Thorsten Blum, linux-mips, linux-kernel
Remove hard-coded strings by using the str_on_off() helper function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/mips/loongson64/env.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c
index 09ff05269861..be8d2ad10750 100644
--- a/arch/mips/loongson64/env.c
+++ b/arch/mips/loongson64/env.c
@@ -17,6 +17,7 @@
#include <linux/dma-map-ops.h>
#include <linux/export.h>
#include <linux/pci_ids.h>
+#include <linux/string_choices.h>
#include <asm/bootinfo.h>
#include <loongson.h>
#include <boot_param.h>
@@ -162,7 +163,7 @@ void __init prom_lefi_init_env(void)
dma_default_coherent = !eirq_source->dma_noncoherent;
}
- pr_info("Firmware: Coherent DMA: %s\n", dma_default_coherent ? "on" : "off");
+ pr_info("Firmware: Coherent DMA: %s\n", str_on_off(dma_default_coherent));
loongson_sysconf.restart_addr = boot_p->reset_system.ResetWarm;
loongson_sysconf.poweroff_addr = boot_p->reset_system.Shutdown;
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env()
2025-01-15 9:01 [PATCH] MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env() Thorsten Blum
@ 2025-01-20 19:41 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2025-01-20 19:41 UTC (permalink / raw)
To: Thorsten Blum; +Cc: Huacai Chen, Jiaxun Yang, linux-mips, linux-kernel
On Wed, Jan 15, 2025 at 10:01:35AM +0100, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_on_off() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> arch/mips/loongson64/env.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c
> index 09ff05269861..be8d2ad10750 100644
> --- a/arch/mips/loongson64/env.c
> +++ b/arch/mips/loongson64/env.c
> @@ -17,6 +17,7 @@
> #include <linux/dma-map-ops.h>
> #include <linux/export.h>
> #include <linux/pci_ids.h>
> +#include <linux/string_choices.h>
> #include <asm/bootinfo.h>
> #include <loongson.h>
> #include <boot_param.h>
> @@ -162,7 +163,7 @@ void __init prom_lefi_init_env(void)
> dma_default_coherent = !eirq_source->dma_noncoherent;
> }
>
> - pr_info("Firmware: Coherent DMA: %s\n", dma_default_coherent ? "on" : "off");
> + pr_info("Firmware: Coherent DMA: %s\n", str_on_off(dma_default_coherent));
>
> loongson_sysconf.restart_addr = boot_p->reset_system.ResetWarm;
> loongson_sysconf.poweroff_addr = boot_p->reset_system.Shutdown;
> --
> 2.47.1
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-20 23:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15 9:01 [PATCH] MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env() Thorsten Blum
2025-01-20 19:41 ` Thomas Bogendoerfer
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).