mm: vmscan: use sysfs_emit() to instead of scnprintf()
Subsystems (3)
PATCH 1/1 mm: vmscan: use sysfs_emit() to instead of scnprintf()
From: Xu Panda <[email protected]>
Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by Xu Panda <[email protected]>
Signed-off-by Yang Yang <[email protected]>
--- mm/vmscan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/vmscan.c +1 -1
@@ -5404,7 +5404,7 @@ static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, cif (IS_ENABLED (CONFIG_ARCH_HAS_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 */
Signature · 1 line
2.15.2