diff options
author | Xu Panda | 2022-11-24 19:29:01 +0800 |
---|---|---|
committer | Andrew Morton | 2022-11-30 15:59:08 -0800 |
commit | 8ef9c32a12a8a0012a4988050947c45521260c5d (patch) | |
tree | 35b3c9ce5c4abd14ba79af2504863ff81f3d7e1d /mm/vmscan.c | |
parent | 7e25de77bc5ea56cc3ff618fc8f4ea1896a4dbb3 (diff) |
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 */ |