From: Hawkins Jiawei <yin31149@gmail.com>
To: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com
Cc: qemu-devel@nongnu.org, yin31149@gmail.com, 18801353760@163.com
Subject: [PATCH v4 1/6] include/hw/virtio: make some VirtIODevice const
Date: Fri, 2 Jun 2023 19:52:13 +0800 [thread overview]
Message-ID: <16c0561b921310a32c240a4fb6e8cee3ffee16fe.1685704856.git.yin31149@gmail.com> (raw)
In-Reply-To: <cover.1685704856.git.yin31149@gmail.com>
The VirtIODevice structure is not modified in
virtio_vdev_has_feature(). Therefore, make it const
to allow this function to accept const variables.
Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Reviewed-by: Eugenio Pérez Martin <eperezma@redhat.com>
---
include/hw/virtio/virtio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index af86ed7249..0492d26900 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -402,7 +402,7 @@ static inline bool virtio_has_feature(uint64_t features, unsigned int fbit)
return !!(features & (1ULL << fbit));
}
-static inline bool virtio_vdev_has_feature(VirtIODevice *vdev,
+static inline bool virtio_vdev_has_feature(const VirtIODevice *vdev,
unsigned int fbit)
{
return virtio_has_feature(vdev->guest_features, fbit);
--
2.25.1
next prev parent reply other threads:[~2023-06-02 11:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 11:52 [PATCH v4 0/6] Vhost-vdpa Shadow Virtqueue Offloads support Hawkins Jiawei
2023-06-02 11:52 ` Hawkins Jiawei [this message]
2023-06-02 11:52 ` [PATCH v4 2/6] vdpa: reuse virtio_vdev_has_feature() Hawkins Jiawei
2023-06-02 11:52 ` [PATCH v4 3/6] hw/net/virtio-net: make some VirtIONet const Hawkins Jiawei
2023-06-02 11:52 ` [PATCH v4 4/6] virtio-net: expose virtio_net_supported_guest_offloads() Hawkins Jiawei
2023-06-02 11:52 ` [PATCH v4 5/6] vdpa: Add vhost_vdpa_net_load_offloads() Hawkins Jiawei
2023-06-02 11:52 ` [PATCH v4 6/6] vdpa: Allow VIRTIO_NET_F_CTRL_GUEST_OFFLOADS in SVQ Hawkins Jiawei
2023-06-02 16:39 ` [PATCH v4 0/6] Vhost-vdpa Shadow Virtqueue Offloads support Lei Yang
2023-06-02 17:47 ` Eugenio Perez Martin
2023-06-03 7:18 ` Hawkins Jiawei
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=16c0561b921310a32c240a4fb6e8cee3ffee16fe.1685704856.git.yin31149@gmail.com \
--to=yin31149@gmail.com \
--cc=18801353760@163.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).