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>
This commit is contained in:
parent
02d3bf099b
commit
705e89cfaa
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user