mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
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>
This commit is contained in:
parent
32cebfe1cc
commit
01b58b1763
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user