Re: [PATCH v7 2/5] x86/kvm: Change print code to use pr_*() format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2019/10/23 5:01, Sean Christopherson wrote:
On Mon, Oct 21, 2019 at 05:11:13PM +0800, Zhenzhong Duan wrote:
pr_*() is preferred than printk(KERN_* ...), after change all the print
in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style.

No functional change.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@xxxxxxxxxx>
Reviewed-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: Radim Krcmar <rkrcmar@xxxxxxxxxx>
Cc: Sean Christopherson <sean.j.christopherson@xxxxxxxxx>
Cc: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
Cc: Wanpeng Li <wanpengli@xxxxxxxxxxx>
Cc: Jim Mattson <jmattson@xxxxxxxxxx>
Cc: Joerg Roedel <joro@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
---
  arch/x86/kernel/kvm.c | 30 ++++++++++++++++--------------
  1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 3bc6a266..249f14a 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -7,6 +7,8 @@
   *   Authors: Anthony Liguori <aliguori@xxxxxxxxxx>
   */
+#define pr_fmt(fmt) "kvm_guest: " fmt
Sort of a silly nit, especially since I suggested kvm_guest...

What about using kvm-guest instead of kvm_guest to be consistent with
kvm-clock, the other prolific logger in a KVM guest.

E.g.

   kvm-clock: cpu 1, msr 551e041, secondary cpu clock
   kvm-guest: setup async PF for cpu 1
   kvm-guest: stealtime: cpu 1, msr 277695f40
   kvm-clock: cpu 2, msr 551e081, secondary cpu clock
   kvm-guest: setup async PF for cpu 2
   kvm-guest: stealtime: cpu 2, msr 277715f40
   kvm-clock: cpu 3, msr 551e0c1, secondary cpu clock
   kvm-guest: setup async PF for cpu 3
   kvm-guest: stealtime: cpu 3, msr 277795f40
   kvm-clock: cpu 4, msr 551e101, secondary cpu clock
instead of

   kvm-clock: cpu 1, msr 551e041, secondary cpu clock
   kvm_guest: setup async PF for cpu 1
   kvm_guest: stealtime: cpu 1, msr 277695f40
   kvm-clock: cpu 2, msr 551e081, secondary cpu clock
   kvm_guest: setup async PF for cpu 2
   kvm_guest: stealtime: cpu 2, msr 277715f40
   kvm-clock: cpu 3, msr 551e0c1, secondary cpu clock
   kvm_guest: setup async PF for cpu 3
   kvm_guest: stealtime: cpu 3, msr 277795f40
   kvm-clock: cpu 4, msr 551e101, secondary cpu clock

Good suggestion, will do, thanks for point out.

Zhenzhong




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux