* [PATCH] mm: swap: Use str_true_false() helper function
@ 2024-10-16 14:10 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2024-10-16 14:10 UTC (permalink / raw)
To: Andrew Morton; +Cc: Thorsten Blum, linux-mm, linux-kernel
Remove hard-coded strings by using the helper function str_true_false().
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
mm/swap_state.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/swap_state.c b/mm/swap_state.c
index 4669f29cf555..e0c0321b8ff7 100644
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -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,
--
2.47.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-10-16 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-16 14:10 [PATCH] mm: swap: Use str_true_false() helper function Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox