Skip to contentSkip to conversation

mm: swap: Use str_true_false() helper function

PATCH Applied Thorsten Blum 1 participant 1 message Oct 16, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: swap: Use str_true_false() helper function

Remove hard-coded strings by using the helper function str_true_false().

---
 mm/swap_state.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
mm/swap_state.c +1 -2
index 4669f29cf555..e0c0321b8ff7 100644
@@ -889,8 +889,7 @@ struct folio *swapin_readahead(swp_entry_t entry, gfp_t gfp_mask,
 static ssize_t vma_ra_enabled_show(struct kobject *kobj,
 				     struct kobj_attribute *attr, char *buf)
 {
-	return sysfs_emit(buf, "%s\n",
-			  enable_vma_readahead ? "true" : "false");
+	return sysfs_emit(buf, "%s\n", str_true_false(enable_vma_readahead));
 }
 static ssize_t vma_ra_enabled_store(struct kobject *kobj,
 				      struct kobj_attribute *attr,
Signature · 1 line
2.47.0