Commit ea239a67 authored by Gautam Dawar's avatar Gautam Dawar Committed by Michael S. Tsirkin

virtio-vdpa: don't set callback if virtio doesn't need it

There's no need for setting callbacks for the driver that doesn't care
about that.
Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarGautam Dawar <gdawar@xilinx.com>
Message-Id: <20220330180436.24644-3-gdawar@xilinx.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 175d493c
...@@ -184,7 +184,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index, ...@@ -184,7 +184,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index,
} }
/* Setup virtqueue callback */ /* Setup virtqueue callback */
cb.callback = virtio_vdpa_virtqueue_cb; cb.callback = callback ? virtio_vdpa_virtqueue_cb : NULL;
cb.private = info; cb.private = info;
ops->set_vq_cb(vdpa, index, &cb); ops->set_vq_cb(vdpa, index, &cb);
ops->set_vq_num(vdpa, index, virtqueue_get_vring_size(vq)); ops->set_vq_num(vdpa, index, virtqueue_get_vring_size(vq));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment