[PATCH vhost v7 2/6] virtio: remove support for names array entries being null.
Halil Pasic
pasic at linux.ibm.com
Tue Apr 2 11:01:03 PDT 2024
On Thu, 28 Mar 2024 16:03:44 +0800
Xuan Zhuo <xuanzhuo at linux.alibaba.com> wrote:
> --- a/drivers/s390/virtio/virtio_ccw.c
> +++ b/drivers/s390/virtio/virtio_ccw.c
> @@ -659,7 +659,7 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,
> {
> struct virtio_ccw_device *vcdev = to_vc_device(vdev);
> unsigned long *indicatorp = NULL;
> - int ret, i, queue_idx = 0;
> + int ret, i;
> struct ccw1 *ccw;
>
> ccw = ccw_device_dma_zalloc(vcdev->cdev, sizeof(*ccw));
> @@ -668,11 +668,11 @@ static int virtio_ccw_find_vqs(struct virtio_device *vdev, unsigned nvqs,
>
> for (i = 0; i < nvqs; ++i) {
> if (!names[i]) {
> - vqs[i] = NULL;
> - continue;
> + ret = -EINVAL;
> + goto out;
> }
>
> - vqs[i] = virtio_ccw_setup_vq(vdev, queue_idx++, callbacks[i],
> + vqs[i] = virtio_ccw_setup_vq(vdev, i, callbacks[i],
> names[i], ctx ? ctx[i] : false,
> ccw);
> if (IS_ERR(vqs[i])) {
For the virtio-ccw part:
Acked-by: Halil Pasic <pasic at linux.ibm.com>
More information about the linux-um
mailing list