Message ID | 202211241929015476424@zte.com.cn (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [linux-next] mm: vmscan: use sysfs_emit() to instead of scnprintf() | expand |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 1147034c86a2..ac494806ee51 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -5404,7 +5404,7 @@ static ssize_t show_enabled(struct kobject *kobj, struct kobj_attribute *attr, c if (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 */