* [PATCH] x86: use KERN_CONT in dump_pagetable()
@ 2017-08-24 9:14 Jan Beulich
2017-08-25 22:09 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2017-08-24 9:14 UTC (permalink / raw)
To: mingo, tglx, hpa; +Cc: linux-kernel
The lack of newlines in preceding format strings is a clear indication
that these were meant to be continuations of one another, and indeed
output ends up quite a bit more compact (and readable) that way.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
arch/x86/mm/fault.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- 4.13-rc6/arch/x86/mm/fault.c
+++ 4.13-rc6-x86-dumppgt-cont/arch/x86/mm/fault.c
@@ -415,9 +415,9 @@ static void dump_pagetable(unsigned long
goto out;
pte = pte_offset_kernel(pmd, address);
- printk("*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte));
+ printk(KERN_CONT "*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte));
out:
- printk("\n");
+ printk(KERN_CONT "\n");
}
#else /* CONFIG_X86_64: */
@@ -574,7 +574,7 @@ static void dump_pagetable(unsigned long
if (bad_address(p4d))
goto bad;
- printk("P4D %lx ", p4d_val(*p4d));
+ printk(KERN_CONT "P4D %lx ", p4d_val(*p4d));
if (!p4d_present(*p4d) || p4d_large(*p4d))
goto out;
@@ -582,7 +582,7 @@ static void dump_pagetable(unsigned long
if (bad_address(pud))
goto bad;
- printk("PUD %lx ", pud_val(*pud));
+ printk(KERN_CONT "PUD %lx ", pud_val(*pud));
if (!pud_present(*pud) || pud_large(*pud))
goto out;
@@ -590,7 +590,7 @@ static void dump_pagetable(unsigned long
if (bad_address(pmd))
goto bad;
- printk("PMD %lx ", pmd_val(*pmd));
+ printk(KERN_CONT "PMD %lx ", pmd_val(*pmd));
if (!pmd_present(*pmd) || pmd_large(*pmd))
goto out;
@@ -598,9 +598,9 @@ static void dump_pagetable(unsigned long
if (bad_address(pte))
goto bad;
- printk("PTE %lx", pte_val(*pte));
+ printk(KERN_CONT "PTE %lx", pte_val(*pte));
out:
- printk("\n");
+ printk(KERN_CONT "\n");
return;
bad:
printk("BAD\n");
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: use KERN_CONT in dump_pagetable()
2017-08-24 9:14 [PATCH] x86: use KERN_CONT in dump_pagetable() Jan Beulich
@ 2017-08-25 22:09 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2017-08-25 22:09 UTC (permalink / raw)
To: Jan Beulich; +Cc: mingo, hpa, linux-kernel
On Thu, 24 Aug 2017, Jan Beulich wrote:
> The lack of newlines in preceding format strings is a clear indication
> that these were meant to be continuations of one another, and indeed
> output ends up quite a bit more compact (and readable) that way.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> arch/x86/mm/fault.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> --- 4.13-rc6/arch/x86/mm/fault.c
> +++ 4.13-rc6-x86-dumppgt-cont/arch/x86/mm/fault.c
> @@ -415,9 +415,9 @@ static void dump_pagetable(unsigned long
> goto out;
>
> pte = pte_offset_kernel(pmd, address);
> - printk("*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte));
> + printk(KERN_CONT "*pte = %0*Lx ", sizeof(*pte) * 2, (u64)pte_val(*pte));
Can you please make that pr_cont() while at it and change the pure
printk()s in that function to pr_info()?
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-25 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 9:14 [PATCH] x86: use KERN_CONT in dump_pagetable() Jan Beulich
2017-08-25 22:09 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®