[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/6] include/hw/virtio: make some VirtIODevice const
From: |
Eugenio Perez Martin |
Subject: |
Re: [PATCH v3 1/6] include/hw/virtio: make some VirtIODevice const |
Date: |
Thu, 1 Jun 2023 16:14:04 +0200 |
On Thu, Jun 1, 2023 at 3:49 PM Hawkins Jiawei <yin31149@gmail.com> wrote:
>
> 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
>
- [PATCH v3 0/6] Vhost-vdpa Shadow Virtqueue Offloads support, Hawkins Jiawei, 2023/06/01
- [PATCH v3 1/6] include/hw/virtio: make some VirtIODevice const, Hawkins Jiawei, 2023/06/01
- Re: [PATCH v3 1/6] include/hw/virtio: make some VirtIODevice const,
Eugenio Perez Martin <=
- [PATCH v3 2/6] vdpa: reuse virtio_vdev_has_feature(), Hawkins Jiawei, 2023/06/01
- [PATCH v3 3/6] hw/net/virtio-net: make some VirtIONet const, Hawkins Jiawei, 2023/06/01
- [PATCH v3 4/6] virtio-net: expose virtio_net_supported_guest_offloads(), Hawkins Jiawei, 2023/06/01
- [PATCH v3 5/6] vdpa: Add vhost_vdpa_net_load_offloads(), Hawkins Jiawei, 2023/06/01