diff options
author | Xu Panda <xu.panda@zte.com.cn> | 2022-11-24 12:29:01 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-12-01 00:59:08 +0100 |
commit | 8ef9c32a12a8a0012a4988050947c45521260c5d (patch) | |
tree | 35b3c9ce5c4abd14ba79af2504863ff81f3d7e1d /mm/vmscan.c | |
parent | s390/mm: use pmd_pgtable_page() helper in __gmap_segment_gaddr() (diff) | |
download | linux-8ef9c32a12a8a0012a4988050947c45521260c5d.tar.xz linux-8ef9c32a12a8a0012a4988050947c45521260c5d.zip |
mm: vmscan: use sysfs_emit() to instead of scnprintf()
Replace open-coded snprintf() with sysfs_emit() to simplify the code.
Link: https://lkml.kernel.org/r/202211241929015476424@zte.com.cn
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Yang Yang <yang.yang29@zte.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 805fa51b175c..9356a3ee639c 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -5407,7 +5407,7 @@ static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, c if (arch_has_hw_nonleaf_pmd_young() && get_cap(LRU_GEN_NONLEAF_YOUNG)) caps |= BIT(LRU_GEN_NONLEAF_YOUNG); - return snprintf(buf, PAGE_SIZE, "0x%04x\n", caps); + return sysfs_emit(buf, "0x%04x\n", caps); } /* see Documentation/admin-guide/mm/multigen_lru.rst for details */ |