From: Thorsten Blum Date: Fri, 17 Jan 2025 11:46:20 +0000 (+0100) Subject: powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers X-Git-Tag: v6.16-rc1~200^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f36a28192e3cbef6952c1b82d4ef78f26a0d2cad;p=thirdparty%2Fkernel%2Flinux.git powerpc/powermac: Use str_enabled_disabled() and str_on_off() helpers Remove hard-coded strings by using the str_enabled_disabled() and str_on_off() helper functions. Signed-off-by: Thorsten Blum Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20250117114625.64903-2-thorsten.blum@linux.dev --- diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 6de1cd5d8a583..e119ced05d103 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -238,8 +239,7 @@ static void __init l2cr_init(void) _set_L2CR(0); _set_L2CR(*l2cr); pr_info("L2CR overridden (0x%x), backside cache is %s\n", - *l2cr, ((*l2cr) & 0x80000000) ? - "enabled" : "disabled"); + *l2cr, str_enabled_disabled((*l2cr) & 0x80000000)); } of_node_put(np); break; diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c index 8633891b7aa58..b4426a35aca33 100644 --- a/arch/powerpc/platforms/powermac/time.c +++ b/arch/powerpc/platforms/powermac/time.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,7 @@ long __init pmac_time_init(void) delta |= 0xFF000000UL; dst = ((pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x8) & 0x80) != 0); printk("GMT Delta read from XPRAM: %d minutes, DST: %s\n", delta/60, - dst ? "on" : "off"); + str_on_off(dst)); #endif return delta; }