Re: [PATCH v1 16/18] vfio/ccw: Create a get_private routine

Jason Gunthorpe
2022-06-02T19:17:50Z

On Thu, Jun 02, 2022 at 07:19:46PM +0200, Eric Farman wrote:

> @@ -125,6 +127,18 @@ extern struct mdev_driver vfio_ccw_mdev_driver;
> extern const struct mdev_parent_ops vfio_ccw_mdev_ops;
> extern const struct vfio_device_ops vfio_ccw_dev_ops;
>
> +static inline struct vfio_ccw_private *vfio_ccw_get_private(struct subchannel *sch)
> +{
> + struct vfio_ccw_private *private;
> +
> + if (!sch)
> + return NULL;

WARN_ON?

Jason