Thread (19 messages) flat view 19 messages, 3 authors, 8d ago
COOLING8d

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

From: Longlong Xia <hidden>
Date: 2026-09-15 15:13:52
Also in: lkml
Subsystem: memory management, memory management - ksm (kernel samepage merging), the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

From: Longlong Xia <redacted>

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 <redacted>

---
 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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help