[PATCH 03/14] mm/ksm: use the correct format specifier for max_page_sharing
From: Longlong Xia
Date: Tue Sep 15 2026 - 11:16:01 EST
From: Longlong Xia <xialonglong@xxxxxxxxxx>
Use %d to match the int type of ksm_max_page_sharing. The accepted
values are at least two, so the sysfs output is unchanged.
Assisted-by: Zcode:GLM-5.3
Signed-off-by: Longlong Xia <xialonglong@xxxxxxxxxx>
---
mm/ksm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/ksm.c b/mm/ksm.c
index 1e4d77852fc8..18d037f571d3 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -3676,7 +3676,7 @@ KSM_ATTR(use_zero_pages);
static ssize_t max_page_sharing_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
- return sysfs_emit(buf, "%u\n", ksm_max_page_sharing);
+ return sysfs_emit(buf, "%d\n", ksm_max_page_sharing);
}
static ssize_t max_page_sharing_store(struct kobject *kobj,
--
2.43.0