public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: fix build error for un-initialised var
@ 2010-03-26 11:28 Bruce Majia
  2010-03-26 11:32 ` Alexander Graf
  0 siblings, 1 reply; 2+ messages in thread
From: Bruce Majia @ 2010-03-26 11:28 UTC (permalink / raw)
  To: agraf-l3A5Bk7waGM, kvm-ppc-u79uwXL29TY76Z2rM5mHXA,
	kvm-u79uwXL29TY76Z2rM5mHXA

>From 28eda49102f6886110376efbff318f1814686945 Mon Sep 17 00:00:00 2001
From: Bruce Majia <bruce.majia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Fri, 26 Mar 2010 19:23:33 +0800
Subject: [PATCH] KVM: PPC: fix build error for un-initialised var

The '-Werror' option for cc makes compiler to distinguish warnings as
errors. So un-initialised variables should be eliminated to avoid build
errors.

Signed-off-by: Bruce Majia <bruce.majia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/powerpc/kvm/booke.c   |    2 +-
 arch/powerpc/kvm/powerpc.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 4d686cc..0cde83b 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -137,7 +137,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
                                         unsigned int priority)
 {
 	int allowed = 0;
-	ulong msr_mask;
+	ulong msr_mask = 0;
 	bool update_esr = false, update_dear = false;
 
 	switch (priority) {
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 51aedd7..372b678 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -277,7 +277,7 @@ static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu,
 static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
                                       struct kvm_run *run)
 {
-	ulong gpr;
+	ulong gpr = 0;
 
 	if (run->mmio.len > sizeof(gpr)) {
 		printk(KERN_ERR "bad MMIO length: %d\n", run->mmio.len);
-- 
1.6.6

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

end of thread, other threads:[~2010-03-26 11:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-26 11:28 [PATCH] KVM: PPC: fix build error for un-initialised var Bruce Majia
2010-03-26 11:32 ` Alexander Graf

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