Skip to contentSkip to conversation

vsprintf: dump full information of page flags in pGp fix

PATCH In review Yafang Shao 2 participants 3 messages Feb 23, 2021 – Mar 9, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vsprintf: dump full information of page flags in pGp fix

The name of the flag should be printed using default_str_spec. There's no difference in the output after this change because the string is printed as-is with both default_dec_spec and default_flag_spec.

This patch is a followup of the patchset
"mm, vsprintf: dump full information of page flags in pGp" [1]

[1]. https://lore.kernel.org/linux-mm/[email protected]/

Cc Petr Mladek <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Miaohe Lin <[email protected]>
Cc Joe Perches <[email protected]>
Cc David Hildenbrand <[email protected]>
---
 lib/vsprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/vsprintf.c +1 -1
index 533ac5404180..5d034e799c06 100644
@@ -1963,7 +1963,7 @@ char *format_page_flags(char *buf, char *end, unsigned long flags)
 			buf++;
 		}
 
-		buf = string(buf, end, p->name, *p->spec);
+		buf = string(buf, end, p->name, default_str_spec);
 		if (buf < end)
 			*buf = '=';
 		buf++;
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Yafang Shao

The name of the flag should be printed using default_str_spec. There's no difference in the output after this change because the string is printed as-is with both default_dec_spec and default_flag_spec.

This patch is a followup of the patchset
"mm, vsprintf: dump full information of page flags in pGp" [1]

[1]. https://lore.kernel.org/linux-mm/[email protected]/

Quoted 8 lines
Cc Petr Mladek <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Andy Shevchenko <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc Miaohe Lin <[email protected]>
Cc Joe Perches <[email protected]>
Cc David Hildenbrand <[email protected]>

Best Regards,
Petr

maintainer
#2 lore raw
In reply to Yafang Shao
Quoted 9 lines · Yafang Shao

The name of the flag should be printed using default_str_spec. There's no difference in the output after this change because the string is printed as-is with both default_dec_spec and default_flag_spec.

This patch is a followup of the patchset
"mm, vsprintf: dump full information of page flags in pGp" [1]

[1]. https://lore.kernel.org/linux-mm/[email protected]/

The patch is comitted in printk/linux.git,
branch for-5.13-vsprintf-pgp.

Best Regards,
Petr