public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] x86/kvm: Resolve some missing-initializers warnings
@ 2014-07-25 13:27 Jeff Kirsher
  2014-07-25 13:27 ` [PATCH 2/4] kvm: Resolve missing-field-initializers warnings Jeff Kirsher
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Jeff Kirsher @ 2014-07-25 13:27 UTC (permalink / raw)
  To: gleb, pbonzini; +Cc: Mark Rustad, kvm, Jeff Kirsher

From: Mark Rustad <mark.d.rustad@intel.com>

Resolve some missing-initializers warnings that appear in W=2
builds. They are resolved by using a designated initialization,
which is enough to resolve the warning.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 arch/x86/kvm/x86.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ef432f8..6d0f47208 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -82,8 +82,8 @@ u64 __read_mostly efer_reserved_bits = ~((u64)(EFER_SCE | EFER_LME | EFER_LMA));
 static u64 __read_mostly efer_reserved_bits = ~((u64)EFER_SCE);
 #endif
 
-#define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM
-#define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU
+#define VM_STAT(x) .offset = offsetof(struct kvm, stat.x), KVM_STAT_VM
+#define VCPU_STAT(x) .offset = offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU
 
 static void update_cr8_intercept(struct kvm_vcpu *vcpu);
 static void process_nmi(struct kvm_vcpu *vcpu);
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-07-31 16:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 13:27 [PATCH 1/4] x86/kvm: Resolve some missing-initializers warnings Jeff Kirsher
2014-07-25 13:27 ` [PATCH 2/4] kvm: Resolve missing-field-initializers warnings Jeff Kirsher
2014-07-25 14:06   ` Paolo Bonzini
2014-07-25 13:27 ` [PATCH 3/4] x86/kvm: Resolve shadow warnings in macro expansion Jeff Kirsher
2014-07-25 14:06   ` Paolo Bonzini
2014-07-25 17:18     ` Rustad, Mark D
2014-07-26  7:34       ` Paolo Bonzini
2014-07-30 21:19   ` [PATCH V2 " Mark D Rustad
2014-07-31 11:50     ` Paolo Bonzini
2014-07-31 16:59   ` [PATCH V3 " Mark D Rustad
2014-07-25 13:27 ` [PATCH 4/4] x86/kvm: Resolve shadow warning from min macro Jeff Kirsher
2014-07-25 14:06   ` Paolo Bonzini
2014-07-25 14:04 ` [PATCH 1/4] x86/kvm: Resolve some missing-initializers warnings Paolo Bonzini
2014-07-30 21:18 ` [PATCH V2 " Mark D Rustad
2014-07-31 11:50   ` Paolo Bonzini
2014-07-31 16:35     ` Rustad, Mark D
2014-07-31 16:50       ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox