LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Like Xu <like.xu.linux@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Ingo Molnar <mingo@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] KVM: x86: Clean up redundant pr_fmt(fmt) macro definition for svm
Date: Mon,  9 Aug 2021 17:34:10 +0800	[thread overview]
Message-ID: <20210809093410.59304-6-likexu@tencent.com> (raw)
In-Reply-To: <20210809093410.59304-1-likexu@tencent.com>

From: Like Xu <likexu@tencent.com>

The svm specific pr_fmt(fmt) macro is repeatedly defined in svm code
and the new one has never been used outside the svm context.

Let's move it to svm.h without any intended functional changes.

Signed-off-by: Like Xu <likexu@tencent.com>
---
 arch/x86/kvm/svm/avic.c   | 2 --
 arch/x86/kvm/svm/nested.c | 2 --
 arch/x86/kvm/svm/svm.c    | 2 --
 arch/x86/kvm/svm/svm.h    | 3 +++
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
index a8ad78a2faa1..8b055f9ad9fe 100644
--- a/arch/x86/kvm/svm/avic.c
+++ b/arch/x86/kvm/svm/avic.c
@@ -12,8 +12,6 @@
  *   Avi Kivity   <avi@qumranet.com>
  */
 
-#define pr_fmt(fmt) "SVM: " fmt
-
 #include <linux/kvm_types.h>
 #include <linux/hashtable.h>
 #include <linux/amd-iommu.h>
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 57c288ba6ef0..3080776a55a5 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -12,8 +12,6 @@
  *   Avi Kivity   <avi@qumranet.com>
  */
 
-#define pr_fmt(fmt) "SVM: " fmt
-
 #include <linux/kvm_types.h>
 #include <linux/kvm_host.h>
 #include <linux/kernel.h>
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 2b6632d4c76f..4a3f8ef56daa 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -1,5 +1,3 @@
-#define pr_fmt(fmt) "SVM: " fmt
-
 #include <linux/kvm_host.h>
 
 #include "irq.h"
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index bd0fe94c2920..76d5fe3f00dc 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -15,6 +15,9 @@
 #ifndef __SVM_SVM_H
 #define __SVM_SVM_H
 
+#undef pr_fmt
+#define pr_fmt(fmt) "SVM: " fmt
+
 #include <linux/kvm_types.h>
 #include <linux/kvm_host.h>
 #include <linux/bits.h>
-- 
2.32.0


  parent reply	other threads:[~2021-08-09  9:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09  9:34 [PATCH 0/5] KVM: x86: Clean up redundant macro definitions Like Xu
2021-08-09  9:34 ` [PATCH 1/5] KVM: x86: Clean up redundant mod_64(x, y) macro definition Like Xu
2021-08-09  9:34 ` [PATCH 2/5] KVM: x86: Clean up redundant CC " Like Xu
2021-08-10 17:47   ` Paolo Bonzini
2021-08-09  9:34 ` [PATCH 3/5] KVM: x86: Clean up redundant ROL16(val, n) " Like Xu
2021-08-10 17:49   ` Paolo Bonzini
2021-08-09  9:34 ` [PATCH 4/5] KVM: x86: Clean up redundant __ex(x) " Like Xu
2021-08-09  9:34 ` Like Xu [this message]
2021-08-10 17:48   ` [PATCH 5/5] KVM: x86: Clean up redundant pr_fmt(fmt) macro definition for svm Paolo Bonzini
2021-08-12 13:00     ` Like Xu
2021-08-09 15:08 ` [PATCH 0/5] KVM: x86: Clean up redundant macro definitions Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210809093410.59304-6-likexu@tencent.com \
    --to=like.xu.linux@gmail.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --subject='Re: [PATCH 5/5] KVM: x86: Clean up redundant pr_fmt(fmt) macro definition for svm' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).