summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/remoteproc_virtio.c
diff options
context:
space:
mode:
authorWei Wang <wei.w.wang@intel.com>2018-12-28 05:26:25 +0300
committerMichael S. Tsirkin <mst@redhat.com>2019-01-15 04:15:18 +0300
commitddbeac07a39a81d82331a312d0578fab94fccbf1 (patch)
tree97d92ef828e7250d9114c56178dba8c71d0ad611 /drivers/remoteproc/remoteproc_virtio.c
parentd1c1dad89e7a8be2cfdc7b92deca2c8048f0d263 (diff)
downloadlinux-ddbeac07a39a81d82331a312d0578fab94fccbf1.tar.xz
virtio_pci: use queue idx instead of array idx to set up the vq
When find_vqs, there will be no vq[i] allocation if its corresponding names[i] is NULL. For example, the caller may pass in names[i] (i=4) with names[2] being NULL because the related feature bit is turned off, so technically there are 3 queues on the device, and name[4] should correspond to the 3rd queue on the device. So we use queue_idx as the queue index, which is increased only when the queue exists. Signed-off-by: Wei Wang <wei.w.wang@intel.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Wei Wang <wei.w.wang@intel.com> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
Diffstat (limited to 'drivers/remoteproc/remoteproc_virtio.c')
0 files changed, 0 insertions, 0 deletions