]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
MIPS: Loongson64: env: Use str_on_off() helper in prom_lefi_init_env()
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 15 Jan 2025 09:01:35 +0000 (10:01 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 20 Jan 2025 19:27:54 +0000 (20:27 +0100)
Remove hard-coded strings by using the str_on_off() helper function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/loongson64/env.c

index 09ff052698614d7c7a59db37511ada7b9f7b9ad7..be8d2ad10750fb9aa35383acae50e55f69332526 100644 (file)
@@ -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;