[PATCH 01/14] mm/ksm: constify ksm_next_page_ops

From: Longlong Xia

Date: Tue Sep 15 2026 - 13:33:32 EST


From: Longlong Xia <xialonglong@xxxxxxxxxx>

ksm_next_page_ops is never modified. Mark it const so it can reside in
read-only memory.

No functional change intended.

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 624f37975e12..f637f3baea69 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2603,7 +2603,7 @@ static int ksm_next_page_pmd_entry(pmd_t *pmdp, unsigned long addr, unsigned lon
return 1;
}

-static struct mm_walk_ops ksm_next_page_ops = {
+static const struct mm_walk_ops ksm_next_page_ops = {
.pmd_entry = ksm_next_page_pmd_entry,
.walk_lock = PGWALK_RDLOCK,
};
--
2.43.0