diff mbox series

[1/4] vhost: Delete useless casting

Message ID 20221028160251.268607-2-eperezma@redhat.com (mailing list archive)
State New, archived
Headers show
Series Endianess and coding style fixes for SVQ event idx support | expand

Commit Message

Eugenio Perez Martin Oct. 28, 2022, 4:02 p.m. UTC
The used event is already an uint16_t pointer

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
 hw/virtio/vhost-shadow-virtqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Oct. 28, 2022, 10:43 p.m. UTC | #1
On 28/10/22 18:02, Eugenio Pérez wrote:
> The used event is already an uint16_t pointer
> 
> Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
> ---
>   hw/virtio/vhost-shadow-virtqueue.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-virtqueue.c
index 5bd14cad96..70766ea740 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -381,7 +381,7 @@  static bool vhost_svq_more_used(VhostShadowVirtqueue *svq)
 static bool vhost_svq_enable_notification(VhostShadowVirtqueue *svq)
 {
     if (virtio_vdev_has_feature(svq->vdev, VIRTIO_RING_F_EVENT_IDX)) {
-        uint16_t *used_event = (uint16_t *)&svq->vring.avail->ring[svq->vring.num];
+        uint16_t *used_event = &svq->vring.avail->ring[svq->vring.num];
         *used_event = svq->shadow_used_idx;
     } else {
         svq->vring.avail->flags &= ~cpu_to_le16(VRING_AVAIL_F_NO_INTERRUPT);