projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a7bba1
)
mm: swap: use str_true_false() helper function
author
Thorsten Blum
<thorsten.blum@linux.dev>
Wed, 16 Oct 2024 14:10:41 +0000
(16:10 +0200)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:14 +0000
(20:11 -0800)
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>
mm/swap_state.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/swap_state.c
b/mm/swap_state.c
index 4669f29cf555748c9c3245a370a613dbfca37d76..e0c0321b8ff71c3ab00044e1ca505a6f001680d0 100644
(file)
--- 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,