On 6/28/22 01:14, Christoph Hellwig wrote:
Just open code the dereferences in the only user.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
Reviewed-by: Kirti Wankhede <kwankhede@xxxxxxxxxx>
---
drivers/s390/cio/vfio_ccw_ops.c | 3 +--
drivers/vfio/mdev/mdev_core.c | 10 ----------
include/linux/mdev.h | 2 --
3 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/s390/cio/vfio_ccw_ops.c b/drivers/s390/cio/vfio_ccw_ops.c
index 25b8d42a522ac..43d53736dfe3c 100644
--- a/drivers/s390/cio/vfio_ccw_ops.c
+++ b/drivers/s390/cio/vfio_ccw_ops.c
@@ -88,8 +88,7 @@ static ssize_t available_instances_show(struct mdev_type *mtype,
struct mdev_type_attribute *attr,
char *buf)
{
- struct vfio_ccw_private *private =
- dev_get_drvdata(mtype_get_parent_dev(mtype));
+ struct vfio_ccw_private *private = dev_get_drvdata(mtype->parent->dev);
return sprintf(buf, "%d\n", atomic_read(&private->avail));
Reviewed-by: Jason J. Herne <jjherne@xxxxxxxxxxxxx>
--
-- Jason J. Herne (jjherne@xxxxxxxxxxxxx)