Commit 96a4c9ec authored by Eric Farman's avatar Eric Farman Committed by Alex Williamson
Browse files

vfio/ccw: Remove FSM Close from remove handlers



Now that neither vfio_ccw_sch_probe() nor vfio_ccw_mdev_probe()
affect the FSM state, it doesn't make sense for their _remove()
counterparts try to revert things in this way. Since the FSM open
and close are handled alongside MDEV open/close, these are
unnecessary.

Signed-off-by: default avatarEric Farman <farman@linux.ibm.com>
Reviewed-by: default avatarMatthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20220728204914.2420989-3-farman@linux.ibm.com


Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent 5a4fe7c4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -241,7 +241,6 @@ static void vfio_ccw_sch_remove(struct subchannel *sch)
{
	struct vfio_ccw_private *private = dev_get_drvdata(&sch->dev);

	vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_CLOSE);
	mdev_unregister_device(&sch->dev);

	dev_set_drvdata(&sch->dev, NULL);
+0 −2
Original line number Diff line number Diff line
@@ -130,8 +130,6 @@ static void vfio_ccw_mdev_remove(struct mdev_device *mdev)

	vfio_unregister_group_dev(&private->vdev);

	vfio_ccw_fsm_event(private, VFIO_CCW_EVENT_CLOSE);

	vfio_uninit_group_dev(&private->vdev);
	atomic_inc(&private->avail);
}