Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-05 Thread Cao jin
On 01/05/2016 06:40 PM, Stefano Stabellini wrote: On Tue, 5 Jan 2016, Cao jin wrote: [...] This is true, however I think that relying on it is error prone: in a couple of years from now somebody might change the call sequence without updating the error handling (easy to forget), causing QEMU

Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-05 Thread Stefano Stabellini
On Tue, 5 Jan 2016, Cao jin wrote: > On 01/04/2016 11:15 PM, Stefano Stabellini wrote: > > On Sun, 27 Dec 2015, Cao jin wrote: > > > To catch the error msg. Also modify the caller > > > > > > Signed-off-by: Cao jin > > > > This looks much better, thanks. > > > > > [...] > > > > > > -int xen_h

Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-04 Thread Cao jin
On 01/04/2016 11:15 PM, Stefano Stabellini wrote: On Sun, 27 Dec 2015, Cao jin wrote: To catch the error msg. Also modify the caller Signed-off-by: Cao jin This looks much better, thanks. [...] -int xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain, -

Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-04 Thread Cao jin
On 01/04/2016 11:15 PM, Stefano Stabellini wrote: On Sun, 27 Dec 2015, Cao jin wrote: To catch the error msg. Also modify the caller Signed-off-by: Cao jin This looks much better, thanks. [...] -int xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain, -

Re: [Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2016-01-04 Thread Stefano Stabellini
On Sun, 27 Dec 2015, Cao jin wrote: > To catch the error msg. Also modify the caller > > Signed-off-by: Cao jin This looks much better, thanks. > hw/xen/xen-host-pci-device.c | 102 > --- > hw/xen/xen-host-pci-device.h | 5 ++- > hw/xen/xen_pt.c

[Qemu-devel] [PATCH v2 1/4] Add Error **errp for xen_host_pci_device_get()

2015-12-27 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 102 --- hw/xen/xen-host-pci-device.h | 5 ++- hw/xen/xen_pt.c | 12 ++--- 3 files changed, 67 insertions(+), 52 deletions(-) diff --g