Skip to contentSkip to conversation

mm/debug: __dump_page() prints an extra line

PATCH Superseded Ralph Campbell 2 participants 2 messages Nov 11, 2019 – Nov 12, 2019

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 mm/debug: __dump_page() prints an extra line

When dumping struct page information, __dump_page() prints the page type with a trailing blank followed by the page flags on a separate line:

anon
flags: 0x100000000090034(uptodate|lru|active|head|swapbacked)

Fix this by using pr_cont() instead of pr_warn() to get a single line:

anon flags: 0x100000000090034(uptodate|lru|active|head|swapbacked)

---

v1 -> v2:
Oops, fix the subject line.

 mm/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/debug.c +1 -1
index 8345bb6e4769..752c78721ea0 100644
@@ -87,7 +87,7 @@ void __dump_page(struct page *page, const char *reason)
 	}
 	BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1);
 
-	pr_warn("flags: %#lx(%pGp)\n", page->flags, &page->flags);
+	pr_cont("flags: %#lx(%pGp)\n", page->flags, &page->flags);
 
 hex_only:
 	print_hex_dump(KERN_WARNING, "raw: ", DUMP_PREFIX_NONE, 32,
Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Ralph Campbell

When dumping struct page information, __dump_page() prints the page type with a trailing blank followed by the page flags on a separate line:

anon
flags: 0x100000000090034(uptodate|lru|active|head|swapbacked)

Fix this by using pr_cont() instead of pr_warn() to get a single line:

anon flags: 0x100000000090034(uptodate|lru|active|head|swapbacked)

Quoted 25 lines

---

v1 -> v2:
Oops, fix the subject line.

 mm/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/debug.c +1 -1
index 8345bb6e4769..752c78721ea0 100644
@@ -87,7 +87,7 @@ void __dump_page(struct page *page, const char *reason)
 	}
 	BUILD_BUG_ON(ARRAY_SIZE(pageflag_names) != __NR_PAGEFLAGS + 1);
 
-	pr_warn("flags: %#lx(%pGp)\n", page->flags, &page->flags);
+	pr_cont("flags: %#lx(%pGp)\n", page->flags, &page->flags);
 
 hex_only:
 	print_hex_dump(KERN_WARNING, "raw: ", DUMP_PREFIX_NONE, 32,
Signature · 1 line
2.20.1