aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
authorHawkins Jiawei <yin31149@gmail.com>2023-06-02 19:52:15 +0800
committerMichael S. Tsirkin <mst@redhat.com>2023-06-26 09:50:00 -0400
commit705e89cfaafc54491482742a756cf661b48608d2 (patch)
treed1235e11ad1b8ca8f60af3cc7348019b33b37c66 /hw/net
parent02d3bf099ba071f37145cfcc34d088e8f839072f (diff)
downloadqemu-705e89cfaafc54491482742a756cf661b48608d2.zip
qemu-705e89cfaafc54491482742a756cf661b48608d2.tar.gz
qemu-705e89cfaafc54491482742a756cf661b48608d2.tar.bz2
hw/net/virtio-net: make some VirtIONet const
The VirtIONet structure is not modified in virtio_net_supported_guest_offloads(). 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 <eperezma@redhat.com> Message-Id: <489b09c3998ac09b9135e57a7dd8c56a4be8cdf9.1685704856.git.yin31149@gmail.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Eugenio Pérez <eperezma@redhat.com> Tested-by: Eugenio Pérez <eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/virtio-net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 6df6b73..7b27dad 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -874,7 +874,7 @@ static uint64_t virtio_net_guest_offloads_by_features(uint32_t features)
return guest_offloads_mask & features;
}
-static inline uint64_t virtio_net_supported_guest_offloads(VirtIONet *n)
+static inline uint64_t virtio_net_supported_guest_offloads(const VirtIONet *n)
{
VirtIODevice *vdev = VIRTIO_DEVICE(n);
return virtio_net_guest_offloads_by_features(vdev->guest_features);