Re: [Qemu-devel] [PATCH] vfio/pci: replace 1 with PCI_CAP_LIST_NEXT to make code self-explain

2016-03-20 Thread Paolo Bonzini
On 16/03/2016 12:27, Michael Tokarev wrote: >> > for (tmp = pdev->config[PCI_CAPABILITY_LIST]; tmp; >> > - tmp = pdev->config[tmp + 1]) { >> > + tmp = pdev->config[tmp + PCI_CAP_LIST_NEXT]) { >> > -next = pdev->config[pos + 1]; >> > +next = pdev->config[pos +

Re: [Qemu-devel] [PATCH] vfio/pci: replace 1 with PCI_CAP_LIST_NEXT to make code self-explain

2016-03-19 Thread Michael Tokarev
11.02.2016 03:54, Wei Yang wrote: > Use the macro PCI_CAP_LIST_NEXT instead of 1, so that the code would be > more self-explain. > > This patch makes this change and also fixs one typo in comment. > > for (tmp = pdev->config[PCI_CAPABILITY_LIST]; tmp; > - tmp = pdev->config[tmp +

Re: [Qemu-devel] [PATCH] vfio/pci: replace 1 with PCI_CAP_LIST_NEXT to make code self-explain

2016-03-19 Thread Wei Yang
On Wed, Mar 16, 2016 at 12:52:52PM +0100, Paolo Bonzini wrote: > > >On 16/03/2016 12:27, Michael Tokarev wrote: >>> > for (tmp = pdev->config[PCI_CAPABILITY_LIST]; tmp; >>> > - tmp = pdev->config[tmp + 1]) { >>> > + tmp = pdev->config[tmp + PCI_CAP_LIST_NEXT]) { >>> > -

[Qemu-devel] [PATCH] vfio/pci: replace 1 with PCI_CAP_LIST_NEXT to make code self-explain

2016-02-10 Thread Wei Yang
Use the macro PCI_CAP_LIST_NEXT instead of 1, so that the code would be more self-explain. This patch makes this change and also fixs one typo in comment. Signed-off-by: Wei Yang --- hw/vfio/pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff