# Re: \[PATCH v5 10/11\] PCI: Replace pci\_dev::driver usage by pci\_dev::dev.driver

- From: Andrew Donnellan \<hidden\>
- Date: 2021-09-29 13:16:57 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/09/8878927
- Thread: https://ratatoskr.run/linux-pci/2021/09/1525586/t.md

```text
On 29/9/21 6:53 pm, Uwe Kleine-König wrote:>   	 list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) {
> -			if (afu_dev->driver && afu_dev->driver->err_handler &&
> -			    afu_dev->driver->err_handler->resume)
> -				afu_dev->driver->err_handler->resume(afu_dev);
> +			struct pci_driver *afu_drv;
> +			if (afu_dev->dev.driver &&
> +			    (afu_drv = to_pci_driver(afu_dev->dev.driver))->err_handler &&

I'm not a huge fan of assignments in if statements and if you send a v6 I'd prefer you break it up.

Apart from that everything in the powerpc and cxl sections looks good to me.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
ajd@linux.ibm.com             IBM Australia Limited
```
