Re: [PATCH v1 2/7] vfio/ccw: remove private->sch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/19/22 12:21 PM, Eric Farman wrote:
> These places all rely on the ability to jump from a private
> struct back to the subchannel struct. Rather than keeping a
> copy in our back pocket, let's use the relationship provided
> by the vfio_device embedded within the private.
> 
> Signed-off-by: Eric Farman <farman@xxxxxxxxxxxxx>
> ---
>  drivers/s390/cio/vfio_ccw_chp.c     |  5 +++--
>  drivers/s390/cio/vfio_ccw_drv.c     |  3 +--
>  drivers/s390/cio/vfio_ccw_fsm.c     | 27 ++++++++++++---------------
>  drivers/s390/cio/vfio_ccw_ops.c     | 12 ++++++------
>  drivers/s390/cio/vfio_ccw_private.h |  7 ++++---
>  5 files changed, 26 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/s390/cio/vfio_ccw_chp.c b/drivers/s390/cio/vfio_ccw_chp.c
> index 13b26a1c7988..d3f3a611f95b 100644
> --- a/drivers/s390/cio/vfio_ccw_chp.c
> +++ b/drivers/s390/cio/vfio_ccw_chp.c
> @@ -16,6 +16,7 @@ static ssize_t vfio_ccw_schib_region_read(struct vfio_ccw_private *private,
>  					  char __user *buf, size_t count,
>  					  loff_t *ppos)
>  {
> +	struct subchannel *sch = to_subchannel(private->vdev.dev->parent);

I'm not a big fan of the amount of indirection there, but I prefer this over back-pocketing the subchannel in vfio_ccw_private anyway

Reviewed-by: Matthew Rosato <mjrosato@xxxxxxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux