Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-30 Thread Frederic Barrat
On 29/09/2021 17:44, Andrew Donnellan wrote: On 29/9/21 11:43 pm, Uwe Kleine-König wrote:> I'm not a huge fan either, I used it to keep the control flow as is and without introducing several calls to to_pci_driver. The whole code looks as follows: list_for_each_entry(afu_dev,

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Andrew Donnellan
On 29/9/21 11:43 pm, Uwe Kleine-König wrote:> I'm not a huge fan either, I used it to keep the control flow as is and without introducing several calls to to_pci_driver. The whole code looks as follows: list_for_each_entry(afu_dev, >phb->bus->devices, bus_list) { struct

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Uwe Kleine-König
On Wed, Sep 29, 2021 at 11:15:37PM +1000, Andrew Donnellan wrote: > On 29/9/21 6:53 pm, Uwe Kleine-König wrote:> > list_for_each_entry(afu_dev, >phb->bus->devices, bus_list) { > > - if (afu_dev->driver && afu_dev->driver->err_handler && > > -

Re: [PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Andrew Donnellan
On 29/9/21 6:53 pm, Uwe Kleine-König wrote:> list_for_each_entry(afu_dev, >phb->bus->devices, bus_list) { - if (afu_dev->driver && afu_dev->driver->err_handler && - afu_dev->driver->err_handler->resume) -

[PATCH v5 10/11] PCI: Replace pci_dev::driver usage by pci_dev::dev.driver

2021-09-29 Thread Uwe Kleine-König
struct pci_dev::driver contains (apart from a constant offset) the same data as struct pci_dev::dev->driver. Replace all remaining users of the former pointer by the latter to allow removing the former. Reviewed-by: Boris Ostrovsky Signed-off-by: Uwe Kleine-König ---