On Tue, 23 Mar 2021 14:55:21 -0300 Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > The kobj pointer in mdev_device is actually pointing at a struct > mdev_type. Use the proper type so things are understandable. > > There are a number of places that are confused and passing both the mdev > and the mtype as function arguments, fix these to derive the mtype > directly from the mdev to remove the redundancy. > > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/vfio/mdev/mdev_core.c | 16 ++++++---------- > drivers/vfio/mdev/mdev_private.h | 7 +++---- > drivers/vfio/mdev/mdev_sysfs.c | 15 ++++++++------- > include/linux/mdev.h | 4 +++- > 4 files changed, 20 insertions(+), 22 deletions(-) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>