diff mbox

fix Xen compilation

Message ID alpine.DEB.2.02.1208011114490.4645@kaball.uk.xensource.com
State New
Headers show

Commit Message

Stefano Stabellini Aug. 1, 2012, 10:19 a.m. UTC
xen_pt_unregister_device is used as PCIUnregisterFunc, so it should
match the type.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Comments

Andreas Färber Aug. 1, 2012, 1:33 p.m. UTC | #1
Am 01.08.2012 12:19, schrieb Stefano Stabellini:
> xen_pt_unregister_device is used as PCIUnregisterFunc, so it should
> match the type.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Tested-by: Andreas Färber <afaerber@suse.de>

/-F

> 
> diff --git a/hw/xen_pt.c b/hw/xen_pt.c
> index fdf68aa..307119a 100644
> --- a/hw/xen_pt.c
> +++ b/hw/xen_pt.c
> @@ -764,7 +764,7 @@ out:
>      return 0;
>  }
>  
> -static int xen_pt_unregister_device(PCIDevice *d)
> +static void xen_pt_unregister_device(PCIDevice *d)
>  {
>      XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, d);
>      uint8_t machine_irq = s->machine_irq;
> @@ -814,8 +814,6 @@ static int xen_pt_unregister_device(PCIDevice *d)
>      memory_listener_unregister(&s->memory_listener);
>  
>      xen_host_pci_device_put(&s->real_device);
> -
> -    return 0;
>  }
>  
>  static Property xen_pci_passthrough_properties[] = {
>
Stefano Stabellini Aug. 1, 2012, 1:40 p.m. UTC | #2
On Wed, 1 Aug 2012, Andreas Färber wrote:
> Am 01.08.2012 12:19, schrieb Stefano Stabellini:
> > xen_pt_unregister_device is used as PCIUnregisterFunc, so it should
> > match the type.
> > 
> > Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> Tested-by: Andreas Färber <afaerber@suse.de>
> 

Thanks!
I have another old Xen fix to configure in my backlog, I am just going
to send a pull request with both fixes in it.
Anthony Liguori Aug. 1, 2012, 3:42 p.m. UTC | #3
Stefano Stabellini <stefano.stabellini@eu.citrix.com> writes:

> xen_pt_unregister_device is used as PCIUnregisterFunc, so it should
> match the type.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

Applied.  Thanks.

Regards,

Anthony Liguori

>
> diff --git a/hw/xen_pt.c b/hw/xen_pt.c
> index fdf68aa..307119a 100644
> --- a/hw/xen_pt.c
> +++ b/hw/xen_pt.c
> @@ -764,7 +764,7 @@ out:
>      return 0;
>  }
>  
> -static int xen_pt_unregister_device(PCIDevice *d)
> +static void xen_pt_unregister_device(PCIDevice *d)
>  {
>      XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, d);
>      uint8_t machine_irq = s->machine_irq;
> @@ -814,8 +814,6 @@ static int xen_pt_unregister_device(PCIDevice *d)
>      memory_listener_unregister(&s->memory_listener);
>  
>      xen_host_pci_device_put(&s->real_device);
> -
> -    return 0;
>  }
>  
>  static Property xen_pci_passthrough_properties[] = {
diff mbox

Patch

diff --git a/hw/xen_pt.c b/hw/xen_pt.c
index fdf68aa..307119a 100644
--- a/hw/xen_pt.c
+++ b/hw/xen_pt.c
@@ -764,7 +764,7 @@  out:
     return 0;
 }
 
-static int xen_pt_unregister_device(PCIDevice *d)
+static void xen_pt_unregister_device(PCIDevice *d)
 {
     XenPCIPassthroughState *s = DO_UPCAST(XenPCIPassthroughState, dev, d);
     uint8_t machine_irq = s->machine_irq;
@@ -814,8 +814,6 @@  static int xen_pt_unregister_device(PCIDevice *d)
     memory_listener_unregister(&s->memory_listener);
 
     xen_host_pci_device_put(&s->real_device);
-
-    return 0;
 }
 
 static Property xen_pci_passthrough_properties[] = {