diff mbox series

KVM: x86: Remove the second definition of pr_fmt in hyperv.c

Message ID 20221227202636.680628-1-aaronlewis@google.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: Remove the second definition of pr_fmt in hyperv.c | expand

Commit Message

Aaron Lewis Dec. 27, 2022, 8:26 p.m. UTC
Both commit e21d10ee00c5 ("KVM: x86: Unify pr_fmt to use module name
for all KVM modules") and commit 1567037614af ("KVM: VMX: Resurrect
vmcs_conf sanitization for KVM-on-Hyper-V") define pr_fmt.

Remove the pr_fmt that was defined in commit 1567037614af ("KVM: VMX:
Resurrect vmcs_conf sanitization for KVM-on-Hyper-V").

With both defined I get this:

arch/x86/kvm/vmx/hyperv.c:4:9: error: 'pr_fmt' macro redefined [-Werror,-Wmacro-redefined]
        ^
arch/x86/kvm/vmx/hyperv.c:2:9: note: previous definition is here
        ^
  UPD     arch/x86/kvm/kvm-asm-offsets.h
  AS      arch/x86/kvm/vmx/vmenter.o
  AS      arch/x86/kvm/svm/vmenter.o
1 error generated.

Signed-off-by: Aaron Lewis <aaronlewis@google.com>
---
 arch/x86/kvm/vmx/hyperv.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Paolo Bonzini Dec. 28, 2022, 11:05 a.m. UTC | #1
On 12/27/22 21:26, Aaron Lewis wrote:
> Both commit e21d10ee00c5 ("KVM: x86: Unify pr_fmt to use module name
> for all KVM modules") and commit 1567037614af ("KVM: VMX: Resurrect
> vmcs_conf sanitization for KVM-on-Hyper-V") define pr_fmt.
> 
> Remove the pr_fmt that was defined in commit 1567037614af ("KVM: VMX:
> Resurrect vmcs_conf sanitization for KVM-on-Hyper-V").
> 
> With both defined I get this:
> 
> arch/x86/kvm/vmx/hyperv.c:4:9: error: 'pr_fmt' macro redefined [-Werror,-Wmacro-redefined]
>          ^
> arch/x86/kvm/vmx/hyperv.c:2:9: note: previous definition is here

Hi Aaron,

since I am not really sure how much I am going to look at KVM during the 
vacations (and I assumed not many people would be looking at the 
results...), I pushed to kvm/queue without even doing a build test.

I am using these early merges to experiment with topic branches so, if 
applicable, I will rewind the merges and fix the semantic conflicts in 
the merges where they arise, either in the merges themselves or in the 
commits.

Paolo
diff mbox series

Patch

diff --git a/arch/x86/kvm/vmx/hyperv.c b/arch/x86/kvm/vmx/hyperv.c
index 398240a4327b5..2a26a0f27d489 100644
--- a/arch/x86/kvm/vmx/hyperv.c
+++ b/arch/x86/kvm/vmx/hyperv.c
@@ -1,8 +1,6 @@ 
 // SPDX-License-Identifier: GPL-2.0
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
-#define pr_fmt(fmt) "kvm/hyper-v: " fmt
-
 #include <linux/errno.h>
 #include <linux/smp.h>