On Fri, Jun 11, 2021 at 2:57 PM Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx> wrote: > > Use to_pci_dev() helper instead of container_of(d, struct pci_dev, dev); ... > - struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); > + struct pci_dev *pdev = to_pci_dev(dev); > struct intel_qep *qep = pci_get_drvdata(pdev); Why not change both lines to dev_get_drvdata()? > - struct pci_dev *pdev = container_of(dev, struct pci_dev, dev); > + struct pci_dev *pdev = to_pci_dev(dev); > struct intel_qep *qep = pci_get_drvdata(pdev); Ditto -- With Best Regards, Andy Shevchenko