mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
virtio_pci: simplify vp_request_msix_vectors() call a bit
Pass desc arg as it is always to vp_request_msix_vectors(). There rely on per_vq_vectors arg and null desc in case it is false. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Message-Id: <20240716113552.80599-3-jiri@resnulli.us> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
de128f3f63
commit
572864d45d
|
|
@ -125,6 +125,9 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
|
|||
GFP_KERNEL))
|
||||
goto error;
|
||||
|
||||
if (!per_vq_vectors)
|
||||
desc = NULL;
|
||||
|
||||
if (desc) {
|
||||
flags |= PCI_IRQ_AFFINITY;
|
||||
desc->pre_vectors++; /* virtio config vector */
|
||||
|
|
@ -349,8 +352,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned int nvqs,
|
|||
nvectors = 2;
|
||||
}
|
||||
|
||||
err = vp_request_msix_vectors(vdev, nvectors, per_vq_vectors,
|
||||
per_vq_vectors ? desc : NULL);
|
||||
err = vp_request_msix_vectors(vdev, nvectors, per_vq_vectors, desc);
|
||||
if (err)
|
||||
goto error_find;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user