Patchwork ppc host, target-ppc: fix building of kvm.c

login
register
mail settings
Submitter Stefan Berger
Date May 26, 2011, 6:50 p.m.
Message ID <4DDEA10F.5070108@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/97612/
State New
Headers show

Comments

Stefan Berger - May 26, 2011, 6:50 p.m.
Below patch fixes the following error when building on a ppc host:

cc1: warnings being treated as errors
/root/qemu/qemu-git/target-ppc/kvm.c: In function kvm_arch_get_registers:
/root/qemu/qemu-git/target-ppc/kvm.c:188: error: unused variable sregs

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

---
  target-ppc/kvm.c |    2 ++
  1 file changed, 2 insertions(+)
Alexander Graf - May 26, 2011, 9:30 p.m.
Am 26.05.2011 um 20:50 schrieb Stefan Berger <stefanb@linux.vnet.ibm.com>:

> Below patch fixes the following error when building on a ppc host:
> 
> cc1: warnings being treated as errors
> /root/qemu/qemu-git/target-ppc/kvm.c: In function kvm_arch_get_registers:
> /root/qemu/qemu-git/target-ppc/kvm.c:188: error: unused variable sregs
> 
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>

Thanks :). I already posted a patch on the list to fix this issue, so this will be fixed soon.

For the meantime, you could just acked-by mine :)

Alex

>

Patch

Index: qemu-git/target-ppc/kvm.c
===================================================================
--- qemu-git.orig/target-ppc/kvm.c
+++ qemu-git/target-ppc/kvm.c
@@ -185,7 +185,9 @@  int kvm_arch_put_registers(CPUState *env
  int kvm_arch_get_registers(CPUState *env)
  {
      struct kvm_regs regs;
+#ifdef KVM_CAP_PPC_BOOKE_SREGS
      struct kvm_sregs sregs;
+#endif
      uint32_t cr;
      int i, ret;