Re: [PATCH v2 7/9] vfio/ccw: Remove private->mdev

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

 



On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote:
> Having a mdev pointer floating about in addition to a struct
> vfio_device
> is confusing. It is only used for three things:
> 
> - Getting the mdev 'struct device *' - this is the same as
>      private->vdev.dev
> 
> - Printing the uuid of the mdev in logging. The uuid is also the
> dev_name
>   of the mdev so this is the same string as
>      dev_name(private->vdev.dev)
> 
> - A weird attempt to fence the vfio_ccw_sch_io_todo() work. This work
> is
>   only queued during states IDLE/PROCESSING/PENDING and flushed when
>   entering CLOSED. Thus the work already cannot run when the mdev is
> NULL.
>   Remove it.
> 
> Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> ---
>  drivers/s390/cio/vfio_ccw_drv.c     |  6 ++--
>  drivers/s390/cio/vfio_ccw_fsm.c     | 48 +++++++++++++------------
> ----
>  drivers/s390/cio/vfio_ccw_ops.c     | 16 ++++------
>  drivers/s390/cio/vfio_ccw_private.h |  2 --
>  include/linux/mdev.h                |  4 ---
>  5 files changed, 30 insertions(+), 46 deletions(-)

I like this patch. Unfortunately it depends on the removal of a hunk in
patch 4, which sets the FSM state to different values based on whether
private->mdev is NULL or not, so can't go on its own. Need to spend
more time thinking about that patch.

Eric




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux