aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHongbo Li <[email protected]>2024-08-27 10:45:16 +0800
committerAndrew Morton <[email protected]>2024-09-01 20:43:42 -0700
commit01b58b1763b36d5597c9fbd6951d7e0386eebfb0 (patch)
tree82a9ad9eb54bc95bb692edaf4eb6f908d9c0dd3e
parent32cebfe1cc21a84e4a907575bb9fd1c3f6b091fd (diff)
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]>
-rw-r--r--mm/memory-tiers.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
index 4775b3a3dabe..af9f5b0d6f1b 100644
--- a/mm/memory-tiers.c
+++ b/mm/memory-tiers.c
@@ -921,8 +921,7 @@ bool numa_demotion_enabled = false;
static ssize_t demotion_enabled_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
- return sysfs_emit(buf, "%s\n",
- numa_demotion_enabled ? "true" : "false");
+ return sysfs_emit(buf, "%s\n", str_true_false(numa_demotion_enabled));
}
static ssize_t demotion_enabled_store(struct kobject *kobj,