Re: [PATCH 1/1] vfio/pci: Remove the core dependency on driver data

From: Jason Gunthorpe

Date: Tue Sep 29 2026 - 15:43:33 EST


On Tue, Sep 29, 2026 at 10:31:01AM -0700, Simon Song wrote:

> +#define VFIO_PCI_CORE_DEFINE_CALLBACKS(name) \
> +static int __maybe_unused name##_pm_suspend(struct device *dev) \
> +{ \
> + return vfio_pci_core_runtime_suspend(dev_get_drvdata(dev)); \

That's completely not the point, these macros need to cast it to the
drivers struct first and then dereference the core struct by member
name.

Jason