Skip to content

Commit f36a281

Browse files
tobluxmaddy-kerneldev
authored andcommitted
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 <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent ff27a9a commit f36a281

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

arch/powerpc/platforms/powermac/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include <linux/root_dev.h>
4646
#include <linux/bitops.h>
4747
#include <linux/suspend.h>
48+
#include <linux/string_choices.h>
4849
#include <linux/of.h>
4950
#include <linux/of_platform.h>
5051

@@ -238,8 +239,7 @@ static void __init l2cr_init(void)
238239
_set_L2CR(0);
239240
_set_L2CR(*l2cr);
240241
pr_info("L2CR overridden (0x%x), backside cache is %s\n",
241-
*l2cr, ((*l2cr) & 0x80000000) ?
242-
"enabled" : "disabled");
242+
*l2cr, str_enabled_disabled((*l2cr) & 0x80000000));
243243
}
244244
of_node_put(np);
245245
break;

arch/powerpc/platforms/powermac/time.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/kernel.h>
1616
#include <linux/param.h>
1717
#include <linux/string.h>
18+
#include <linux/string_choices.h>
1819
#include <linux/mm.h>
1920
#include <linux/init.h>
2021
#include <linux/time.h>
@@ -77,7 +78,7 @@ long __init pmac_time_init(void)
7778
delta |= 0xFF000000UL;
7879
dst = ((pmac_xpram_read(PMAC_XPRAM_MACHINE_LOC + 0x8) & 0x80) != 0);
7980
printk("GMT Delta read from XPRAM: %d minutes, DST: %s\n", delta/60,
80-
dst ? "on" : "off");
81+
str_on_off(dst));
8182
#endif
8283
return delta;
8384
}

0 commit comments

Comments
 (0)