RE: [PATCH v2 15/15] vfio: Add struct device to vfio_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Jason Gunthorpe
> Sent: Thursday, September 8, 2022 8:37 PM
> 
> On Thu, Sep 08, 2022 at 11:39:07AM +0200, Eric Auger wrote:
> 
> > >> I am not totally clear about remaining 'struct device *dev;' in
> > >> vfio_device struct. I see it used in some places. Is it supposed to
> > >> disappear at some point?
> > >
> > > no, Eric. *dev will not disappear, it stores the dev pointet passed in by
> > > caller of vfio_init_device().
> >
> > yeah I see but you have device->device.parent = device->dev;
> 
> IIRC we have a number of these redundancies now, often the drivers
> store another copy of the dev too.
> 
> A significant use of dev is for printing things, what should be done
> here is to create a subsystem wide vfio_warn/etc that takes in the
> vfio_device, and then print properly from there. Now that we have a
> struct device all the prints should also include the VFIO struct
> device name, and then the PCI device perhaps in brackets.
> 

Let me handle it in a separate patch (after this series).




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux