[PATCH -next v3 2/3] mm: make use of str_true_false helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The helper str_true_false is introduced to reback "true/false"
string literal. We can simplify this format by str_true_false.

Signed-off-by: Hongbo Li <lihongbo22@xxxxxxxxxx>
---
 mm/memory-tiers.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
index 2a642ea86cb2..66ea9099dd63 100644
--- a/mm/memory-tiers.c
+++ b/mm/memory-tiers.c
@@ -940,8 +940,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,
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux