mm: Use str_on_off() helper function in report_meminit()
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 18 Oct 2024 10:31:51 +0000 (12:31 +0200)
committerMike Rapoport (Microsoft) <rppt@kernel.org>
Fri, 18 Oct 2024 16:05:58 +0000 (19:05 +0300)
Remove hard-coded strings by using the helper function str_on_off().

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://lore.kernel.org/r/20241018103150.96824-2-thorsten.blum@linux.dev
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
mm/mm_init.c

index 4ba5607aaf1943214c7f79f2a52e17eefac2ad79..253972926183c4636851bc15dee2437607c45588 100644 (file)
@@ -2573,8 +2573,8 @@ static void __init report_meminit(void)
                stack = "off";
 
        pr_info("mem auto-init: stack:%s, heap alloc:%s, heap free:%s\n",
-               stack, want_init_on_alloc(GFP_KERNEL) ? "on" : "off",
-               want_init_on_free() ? "on" : "off");
+               stack, str_on_off(want_init_on_alloc(GFP_KERNEL)),
+               str_on_off(want_init_on_free()));
        if (want_init_on_free())
                pr_info("mem auto-init: clearing system memory may take some time...\n");
 }