Skip to contentSkip to conversation

mm: Constify __dump_folio() arguments

PATCH Superseded Matthew Wilcox (Oracle) 1 participant 2 messages Nov 6, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm: Constify __dump_folio() arguments

These arguments aren't modified by the function; mark them as const to help the compiler.

---
 mm/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/debug.c +1 -1
index 64ddb0c4b4be..81f03e185d29 100644
@@ -67,7 +67,7 @@ static const char *page_type_name(unsigned int page_type)
 	return page_type_names[i];
 }
 
-static void __dump_folio(struct folio *folio, struct page *page,
+static void __dump_folio(const struct folio *folio, struct page *page,
 		unsigned long pfn, unsigned long idx)
 {
 	struct address_space *mapping = folio_mapping(folio);
Signature · 1 line
2.47.2
#1 lore raw
Quoted 2 lines · Matthew Wilcox (Oracle)

These arguments aren't modified by the function; mark them as const to help the compiler.

Oops, wrong version.