lkml.org 
[lkml]   [2022]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 31/34] vfio/mdev: Remove mdev_parent_ops dev_attr_groups
From


On 4/11/2022 7:44 PM, Christoph Hellwig wrote:
> From: Jason Gunthorpe <jgg@nvidia.com>
>
> 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>
> ---
> drivers/vfio/mdev/mdev_sysfs.c | 12 ++----------
> include/linux/mdev.h | 2 --
> samples/vfio-mdev/mtty.c | 30 +-----------------------------
> 3 files changed, 3 insertions(+), 41 deletions(-)
>

Update Documentation/driver-api/vfio-mediated-device.rst where mtty
sample code explained. Tree command output should be updated, i.e remove
below 2 lines.
|-- mtty_dev
| `-- sample_mtty_dev

Rest looks good to me.

Thanks,
Kirti

\
 
 \ /
  Last update: 2022-04-12 23:06    [W:0.236 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site