Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-18 Thread Eduardo Habkost
On Tue, Apr 18, 2017 at 04:43:48PM +0300, Marcel Apfelbaum wrote: > On 04/18/2017 12:59 AM, Eduardo Habkost wrote: > > Every single caller of of pci_register_bus() saves the return value in > > phb->bus. Do that inside pci_register_bus() to avoid code duplication > > and make it harder to break. >

Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-18 Thread Marcel Apfelbaum
On 04/18/2017 12:59 AM, Eduardo Habkost wrote: Every single caller of of pci_register_bus() saves the return value in phb->bus. Do that inside pci_register_bus() to avoid code duplication and make it harder to break. I personally find that more difficult to follow, maybe the function name is m

Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-18 Thread Cornelia Huck
On Mon, 17 Apr 2017 18:59:14 -0300 Eduardo Habkost wrote: > Every single caller of of pci_register_bus() saves the return value in > phb->bus. Do that inside pci_register_bus() to avoid code duplication > and make it harder to break. > > Most (but not all) conversions done using the following Co

Re: [Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-17 Thread David Gibson
On Mon, Apr 17, 2017 at 06:59:14PM -0300, Eduardo Habkost wrote: > Every single caller of of pci_register_bus() saves the return value in > phb->bus. Do that inside pci_register_bus() to avoid code duplication > and make it harder to break. > > Most (but not all) conversions done using the followi

[Qemu-devel] [RFC 5/7] pci: Set phb->bus inside pci_register_bus()

2017-04-17 Thread Eduardo Habkost
Every single caller of of pci_register_bus() saves the return value in phb->bus. Do that inside pci_register_bus() to avoid code duplication and make it harder to break. Most (but not all) conversions done using the following Coccinelle script: @@ identifier b; expression phb; @@ -b = p