Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-09-04 Thread Xian Han Yu
On 9/2/2016 9:18 PM, Martin Kletzander wrote: On Mon, Aug 15, 2016 at 06:22:25AM +0200, Xian Han Yu wrote: The 'multi' element in PCI address struct used as 'virTristateSwitch', and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI process use 'false' to initialization 'multi',

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-09-02 Thread Martin Kletzander
On Mon, Aug 15, 2016 at 06:22:25AM +0200, Xian Han Yu wrote: The 'multi' element in PCI address struct used as 'virTristateSwitch', and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI process use 'false' to initialization 'multi', which is ambiguously for assignment or comparison.

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-09-01 Thread Xian Han Yu
Ping On 8/15/2016 12:22 PM, Xian Han Yu wrote: The 'multi' element in PCI address struct used as 'virTristateSwitch', and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI process use 'false' to initialization 'multi', which is ambiguously for assignment or comparison. This patch

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-23 Thread Xian Han Yu
Ping... On 8/15/2016 12:22 PM, Xian Han Yu wrote: The 'multi' element in PCI address struct used as 'virTristateSwitch', and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI process use 'false' to initialization 'multi', which is ambiguously for assignment or comparison. This

[libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-14 Thread Xian Han Yu
The 'multi' element in PCI address struct used as 'virTristateSwitch', and its default value is 'VIR_TRISTATE_SWITCH_ABSENT'. Current PCI process use 'false' to initialization 'multi', which is ambiguously for assignment or comparison. This patch use '{0}' to initialize the whole PCI address

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-12 Thread Xian Han Yu
On 8/11/2016 9:54 PM, Martin Kletzander wrote: On Thu, Aug 11, 2016 at 10:46:28AM +0100, Daniel P. Berrange wrote: On Thu, Aug 11, 2016 at 05:39:06PM +0800, Xian Han Yu wrote: On 8/11/2016 5:00 PM, Daniel P. Berrange wrote: > On Thu, Aug 11, 2016 at 10:55:44AM +0200, Andrea Bolognani

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-11 Thread Martin Kletzander
On Thu, Aug 11, 2016 at 10:46:28AM +0100, Daniel P. Berrange wrote: On Thu, Aug 11, 2016 at 05:39:06PM +0800, Xian Han Yu wrote: On 8/11/2016 5:00 PM, Daniel P. Berrange wrote: > On Thu, Aug 11, 2016 at 10:55:44AM +0200, Andrea Bolognani wrote: > > On Thu, 2016-08-11 at 14:48 +0800, Xian Han

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 05:39:06PM +0800, Xian Han Yu wrote: > > > On 8/11/2016 5:00 PM, Daniel P. Berrange wrote: > > On Thu, Aug 11, 2016 at 10:55:44AM +0200, Andrea Bolognani wrote: > > > On Thu, 2016-08-11 at 14:48 +0800, Xian Han Yu wrote: > > > > > The default is not OFF, though, it's

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-11 Thread Xian Han Yu
On 8/11/2016 5:00 PM, Daniel P. Berrange wrote: On Thu, Aug 11, 2016 at 10:55:44AM +0200, Andrea Bolognani wrote: On Thu, 2016-08-11 at 14:48 +0800, Xian Han Yu wrote: The default is not OFF, though, it's ABSENT :) In fact, as far as I can tell, OFF isn't ever used explicitly either for

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-11 Thread Daniel P. Berrange
On Thu, Aug 11, 2016 at 10:55:44AM +0200, Andrea Bolognani wrote: > On Thu, 2016-08-11 at 14:48 +0800, Xian Han Yu wrote: > > > The default is not OFF, though, it's ABSENT :) > > >  > > > In fact, as far as I can tell, OFF isn't ever used explicitly > > > either for assignment or comparison. And

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-11 Thread Andrea Bolognani
On Thu, 2016-08-11 at 14:48 +0800, Xian Han Yu wrote: > > The default is not OFF, though, it's ABSENT :) > >  > > In fact, as far as I can tell, OFF isn't ever used explicitly > > either for assignment or comparison. And false is plain wrong > > from a datatype point of view. >   > How about we

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-11 Thread Xian Han Yu
On 8/10/2016 11:34 PM, Andrea Bolognani wrote: On Wed, 2016-08-10 at 17:16 +0200, Boris Fiuczynski wrote: for (i = 0; i < nAddrNodes; i++) { -virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 }; +virPCIDeviceAddress addr = { 0, 0, 0, 0, false }; Honestly, I have no idea

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-10 Thread Laine Stump
On 08/10/2016 11:34 AM, Andrea Bolognani wrote: On Wed, 2016-08-10 at 17:16 +0200, Boris Fiuczynski wrote: for (i = 0; i < nAddrNodes; i++) { -virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 }; +virPCIDeviceAddress addr = { 0, 0, 0, 0, false }; Honestly, I have no idea what

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-10 Thread Andrea Bolognani
On Wed, 2016-08-10 at 17:16 +0200, Boris Fiuczynski wrote: > > > >  for (i = 0; i < nAddrNodes; i++) { > > > > -virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 }; > > > > +virPCIDeviceAddress addr = { 0, 0, 0, 0, false }; > > >  > > > Honestly, I have no idea what preferences we

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-10 Thread Boris Fiuczynski
On 08/09/2016 11:25 AM, Andrea Bolognani wrote: On Tue, 2016-08-09 at 11:19 +0200, Martin Kletzander wrote: for (i = 0; i < nAddrNodes; i++) { -virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 }; +virPCIDeviceAddress addr = { 0, 0, 0, 0, false }; Honestly, I have no idea what

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-09 Thread Andrea Bolognani
On Tue, 2016-08-09 at 11:19 +0200, Martin Kletzander wrote: > > for (i = 0; i < nAddrNodes; i++) { > > -virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 }; > > +virPCIDeviceAddress addr = { 0, 0, 0, 0, false }; >  > Honestly, I have no idea what preferences we have for such >

Re: [libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-09 Thread Martin Kletzander
On Tue, Aug 09, 2016 at 10:49:04AM +0200, Xian Han Yu wrote: Signed-off-by: Xian Han Yu --- You could've been more descriptive in the commit message. Like describing what's the reason for this change? Just to initialize bool to 'false' instead 0? Is there

[libvirt] [PATCH] conf: Fix initialization value of 'multi' in PCI address

2016-08-09 Thread Xian Han Yu
Signed-off-by: Xian Han Yu --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index a23d8ef..96fdb6f 100644 --- a/src/conf/node_device_conf.c +++