]> git.baikalelectronics.ru Git - kernel.git/commit
vfio/mdev: Remove mdev_parent_ops dev_attr_groups
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 11 Apr 2022 14:14:00 +0000 (16:14 +0200)
committerZhi Wang <zhi.a.wang@intel.com>
Thu, 21 Apr 2022 11:36:56 +0000 (07:36 -0400)
commit40018f84b49d389592639ee1ec86324101c01540
treef1c273b67fdd9104f17f58467e78622f41752810
parent5458d51ef11ffedc947c75d4def9163d7f1458dc
vfio/mdev: Remove mdev_parent_ops dev_attr_groups

This is only used by one sample to print a fixed string that is pointless.

In general, having a device driver attach sysfs attributes to the parent
is horrific. This should never happen, and always leads to some kind of
liftime bug as it become very difficult for the sysfs attribute to go back
to any data owned by the device driver.

Remove the general mechanism to create this abuse.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-32-hch@lst.de
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
drivers/vfio/mdev/mdev_sysfs.c
include/linux/mdev.h
samples/vfio-mdev/mtty.c