summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2024-10-16 16:10:41 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-11-06 20:11:14 -0800
commitd3ea85c6c5f70acff970f3339afb2da8f9a805a6 (patch)
tree12574a8a9fb78fc84d4401ee4ef5212c4c9fd184
parent4a7bba1df00163ecbdf4994bc42b879ade4aeed2 (diff)
downloadlwn-d3ea85c6c5f70acff970f3339afb2da8f9a805a6.tar.gz
lwn-d3ea85c6c5f70acff970f3339afb2da8f9a805a6.zip
mm: swap: use str_true_false() helper function
Remove hard-coded strings by using the helper function str_true_false(). Link: https://lkml.kernel.org/r/20241016141040.79168-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/swap_state.c3
1 files changed, 1 insertions, 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,