mbox series

[0/3] driver core: class: remove class_compat code

Message ID 147a2a3e-8227-4f1b-9ab4-d0b4f261d2a6@gmail.com (mailing list archive)
Headers show
Series driver core: class: remove class_compat code | expand

Message

Heiner Kallweit Dec. 3, 2024, 8:08 p.m. UTC
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.

Heiner Kallweit (3):
  driver core: class: add class_pseudo_register
  vfio/mdev: inline needed class_compat functionality
  driver core: class: remove class_compat code

 drivers/base/class.c          | 89 ++++-------------------------------
 drivers/vfio/mdev/mdev_core.c | 12 ++---
 include/linux/device/class.h  |  8 +---
 3 files changed, 15 insertions(+), 94 deletions(-)

Comments

Christoph Hellwig Dec. 12, 2024, 4:27 a.m. UTC | #1
On Tue, Dec 03, 2024 at 09:08:55PM +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.

Is there any reason it can't just be removed entirely?