[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200924032125.18619-5-jasowang@redhat.com>
Date: Thu, 24 Sep 2020 11:21:05 +0800
From: Jason Wang <jasowang@...hat.com>
To: mst@...hat.com, jasowang@...hat.com
Cc: lulu@...hat.com, kvm@...r.kernel.org,
virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, rob.miller@...adcom.com,
lingshan.zhu@...el.com, eperezma@...hat.com, hanand@...inx.com,
mhabets@...arflare.com, eli@...lanox.com, amorenoz@...hat.com,
maxime.coquelin@...hat.com, stefanha@...hat.com,
sgarzare@...hat.com
Subject: [RFC PATCH 04/24] 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: Jason Wang <jasowang@...hat.com>
---
drivers/virtio/virtio_vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c
index 4a9ddb44b2a7..af6ee677f319 100644
--- a/drivers/virtio/virtio_vdpa.c
+++ b/drivers/virtio/virtio_vdpa.c
@@ -175,7 +175,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index,
}
/* Setup virtqueue callback */
- cb.callback = virtio_vdpa_virtqueue_cb;
+ cb.callback = callback ? virtio_vdpa_virtqueue_cb : NULL;
cb.private = info;
ops->set_vq_cb(vdpa, index, &cb);
ops->set_vq_num(vdpa, index, virtqueue_get_vring_size(vq));
--
2.20.1
Powered by blists - more mailing lists