On Fri, Mar 12, 2021 at 01:42:44PM +0000, Liu, Yi L wrote: > Hi Jason, > > > From: Jason Gunthorpe <jgg@xxxxxxxxxx> > > Sent: Wednesday, March 10, 2021 5:39 AM > > > > This tidies a few confused places that think they can have a refcount on > > the vfio_device but the device_data could be NULL, that isn't possible by > > design. > > I think the purpose of this patch is to use container_of in vfio_pci driver > since patch 0008 has already let the callbacks of vfio_device_ops to pass in > struct vfio_device, which can be used to get the vfio_pci_device easily with > container_of. Just not quite get relationship between the above commit message. > and the actual purpose. But I'm not a native speaker, so this is not a strong > comment. Just FYI. Patch 8,9,10 are a sequence with the goal to remove everything related to vfio_device_data() Patch 8 removes the device_data connected to the ops Patch 9 removes the remaining vfio_device_data calls. Patch 10 removes device_data completely Jason