virtio_vdpa: remove redundant check on desc
authorColin Ian King <colin.i.king@gmail.com>
Thu, 7 Nov 2024 13:21:14 +0000 (13:21 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 12 Nov 2024 23:07:46 +0000 (18:07 -0500)
commit6a39bb15b3d1c355ab198d41f9590379d734f0bb
tree6a1f1b4b3174521bb4c95198be23ab3e0a78ee90
parentdf28040c7f24559ffb23d5323eaa2f023a107dbe
virtio_vdpa: remove redundant check on desc

The boolean variable has_affinity is true when desc is non-null and
ops->set_vq_affinity is non-null. Hence the call to create_affinity_masks
does not need to check for desc being non-null is redundant when
has_affinity is true, so it can be removed as well as the now unused
default_affd.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Message-Id: <20241107132114.22188-1-colin.i.king@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
drivers/virtio/virtio_vdpa.c