[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/4] vhost: Fix lines over 80 characters
From: |
Eugenio Pérez |
Subject: |
[PATCH 3/4] vhost: Fix lines over 80 characters |
Date: |
Fri, 28 Oct 2022 18:02:50 +0200 |
By qemu coding style.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
---
hw/virtio/vhost-shadow-virtqueue.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost-shadow-virtqueue.c
b/hw/virtio/vhost-shadow-virtqueue.c
index 467099f5d9..18a49e1ecb 100644
--- a/hw/virtio/vhost-shadow-virtqueue.c
+++ b/hw/virtio/vhost-shadow-virtqueue.c
@@ -228,8 +228,11 @@ static void vhost_svq_kick(VhostShadowVirtqueue *svq)
smp_mb();
if (virtio_vdev_has_feature(svq->vdev, VIRTIO_RING_F_EVENT_IDX)) {
- uint16_t avail_event = *(uint16_t
*)(&svq->vring.used->ring[svq->vring.num]);
- needs_kick = vring_need_event(avail_event, svq->shadow_avail_idx,
svq->shadow_avail_idx - 1);
+ size_t num = svq->vring.num;
+ uint16_t *avail_event = (uint16_t *)&svq->vring.used->ring[num];
+
+ needs_kick = vring_need_event(*avail_event, svq->shadow_avail_idx,
+ svq->shadow_avail_idx - 1);
} else {
needs_kick = !(svq->vring.used->flags & VRING_USED_F_NO_NOTIFY);
}
--
2.31.1
- [PATCH 0/4] Endianess and coding style fixes for SVQ event idx support, Eugenio Pérez, 2022/10/28
- [PATCH 3/4] vhost: Fix lines over 80 characters,
Eugenio Pérez <=
- [PATCH 2/4] vhost: convert byte order on SVQ used event write, Eugenio Pérez, 2022/10/28
- Re: [PATCH 2/4] vhost: convert byte order on SVQ used event write, Philippe Mathieu-Daudé, 2022/10/28
- Re: [PATCH 2/4] vhost: convert byte order on SVQ used event write, Eugenio Perez Martin, 2022/10/31
- Re: [PATCH 2/4] vhost: convert byte order on SVQ used event write, Michael S. Tsirkin, 2022/10/31
- Re: [PATCH 2/4] vhost: convert byte order on SVQ used event write, Eugenio Perez Martin, 2022/10/31
- Re: [PATCH 2/4] vhost: convert byte order on SVQ used event write, Michael S. Tsirkin, 2022/10/31