On Fri, 10 Jan 2025 15:35:30 +0100 Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > On Tue, Dec 03, 2024 at 09:11:47PM +0100, Heiner Kallweit wrote: > > vfio/mdev is the last user of class_compat, and it doesn't use it for > > the intended purpose. See kdoc of class_compat_register(): > > Compatibility class are meant as a temporary user-space compatibility > > workaround when converting a family of class devices to a bus devices. > > > > In addition it uses only a part of the class_compat functionality. > > So inline the needed functionality, and afterwards all class_compat > > code can be removed. > > > > No functional change intended. Compile-tested only. > > Did this ever get tested? I wasn't sure where we stand between this and https://lore.kernel.org/all/db49131d-fd79-4f23-93f2-0ab541a345fa@xxxxxxxxx/ I've tested them both separately. Tested-by: Alex Williamson <alex.williamson@xxxxxxxxxx> Acked-by: Alex Williamson <alex.williamson@xxxxxxxxxx> > > Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> > > --- > > drivers/vfio/mdev/mdev_core.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c > > index ed4737de4..a22c49804 100644 > > --- a/drivers/vfio/mdev/mdev_core.c > > +++ b/drivers/vfio/mdev/mdev_core.c > > @@ -18,7 +18,7 @@ > > #define DRIVER_AUTHOR "NVIDIA Corporation" > > #define DRIVER_DESC "Mediated device Core Driver" > > > > -static struct class_compat *mdev_bus_compat_class; > > +static struct kobject *mdev_bus_kobj; > > If you want to resubmit this, after testing, you need some BIG comments > here as to what you are doing and why, and that no one else should EVER > do this again so they don't cut/paste from this code to create the same > mess. WFM. Thanks, Alex