From: "Eugenio Pérez" <eperezma@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Jason Wang <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH 3/4] vhost: Fix lines over 80 characters
Date: Fri, 28 Oct 2022 18:02:50 +0200 [thread overview]
Message-ID: <20221028160251.268607-4-eperezma@redhat.com> (raw)
In-Reply-To: <20221028160251.268607-1-eperezma@redhat.com>
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
next prev parent reply other threads:[~2022-10-28 16:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-28 16:02 [PATCH 0/4] Endianess and coding style fixes for SVQ event idx support Eugenio Pérez
2022-10-28 16:02 ` [PATCH 1/4] vhost: Delete useless casting Eugenio Pérez
2022-10-28 22:43 ` Philippe Mathieu-Daudé
2022-10-28 16:02 ` [PATCH 2/4] vhost: convert byte order on SVQ used event write Eugenio Pérez
2022-10-28 22:48 ` Philippe Mathieu-Daudé
2022-10-31 8:17 ` Michael S. Tsirkin
2022-10-31 9:48 ` Philippe Mathieu-Daudé
2022-10-31 8:54 ` Eugenio Perez Martin
2022-10-31 12:33 ` Michael S. Tsirkin
2022-10-31 13:02 ` Eugenio Perez Martin
2022-10-31 15:09 ` Michael S. Tsirkin
2022-10-31 16:05 ` Eugenio Perez Martin
2022-10-31 17:29 ` Michael S. Tsirkin
2022-10-28 16:02 ` Eugenio Pérez [this message]
2022-10-28 16:45 ` [PATCH 3/4] vhost: Fix lines over 80 characters Michael S. Tsirkin
2022-10-31 7:43 ` Eugenio Perez Martin
2022-10-28 16:02 ` [PATCH 4/4] vhost: convert byte order on avail_event read Eugenio Pérez
2022-10-28 22:53 ` Philippe Mathieu-Daudé
2022-10-31 8:29 ` Eugenio Perez Martin
2022-10-31 12:35 ` Michael S. Tsirkin
2022-11-01 2:27 ` Jason Wang
2022-10-29 8:24 ` [PATCH 0/4] Endianess and coding style fixes for SVQ event idx support Michael S. Tsirkin
2022-10-31 8:14 ` Philippe Mathieu-Daudé
2022-11-01 2:41 ` Jason Wang
[not found] ` <CAJFLiB+kQ9mjy6V7uKXwoONhJ9-uiw2O3v-7WoM-B5Zaiv-jXg@mail.gmail.com>
2022-11-18 2:49 ` Lei Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221028160251.268607-4-eperezma@redhat.com \
--to=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).