Skip to content

Commit 01b58b1

Browse files
Hongbo Liakpm00
authored andcommitted
mm: make use of str_true_false helper
The helper str_true_false() was introduced to return "true/false" string literal. We can simplify this format by str_true_false. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Hongbo Li <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Anna Schumaker <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Kees Cook <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Trond Myklebust <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 32cebfe commit 01b58b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mm/memory-tiers.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,8 +921,7 @@ bool numa_demotion_enabled = false;
921921
static ssize_t demotion_enabled_show(struct kobject *kobj,
922922
struct kobj_attribute *attr, char *buf)
923923
{
924-
return sysfs_emit(buf, "%s\n",
925-
numa_demotion_enabled ? "true" : "false");
924+
return sysfs_emit(buf, "%s\n", str_true_false(numa_demotion_enabled));
926925
}
927926

928927
static ssize_t demotion_enabled_store(struct kobject *kobj,

0 commit comments

Comments
 (0)