summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorHongbo Li <lihongbo22@huawei.com>2024-08-27 10:45:16 +0800
committerAndrew Morton <akpm@linux-foundation.org>2024-09-01 20:43:42 -0700
commit01b58b1763b36d5597c9fbd6951d7e0386eebfb0 (patch)
tree82a9ad9eb54bc95bb692edaf4eb6f908d9c0dd3e /mm
parent32cebfe1cc21a84e4a907575bb9fd1c3f6b091fd (diff)
downloadlinux-01b58b1763b36d5597c9fbd6951d7e0386eebfb0.tar.gz
linux-01b58b1763b36d5597c9fbd6951d7e0386eebfb0.tar.bz2
linux-01b58b1763b36d5597c9fbd6951d7e0386eebfb0.zip
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/20240827024517.914100-3-lihongbo22@huawei.com Signed-off-by: Hongbo Li <lihongbo22@huawei.com> Cc: Andy Shevchenko <andy@kernel.org> Cc: Anna Schumaker <anna@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Kees Cook <kees@kernel.org> Cc: Matthew Wilcox <willy@infradead.org> Cc: Trond Myklebust <trondmy@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-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,