qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-trivial@nongnu.org, Max Reitz <mreitz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [PATCH 1/3] hw/virtio: Pass virtio_feature_get_config_size() a const argument
Date: Wed, 12 May 2021 10:55:59 +0800	[thread overview]
Message-ID: <fe8bbc8e-be18-a5db-414f-4008b07a6f36@redhat.com> (raw)
In-Reply-To: <20210511104157.2880306-2-philmd@redhat.com>


在 2021/5/11 下午6:41, Philippe Mathieu-Daudé 写道:
> The VirtIOFeature structure isn't modified, mark it const.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>


Acked-by: Jason Wang <jasowang@redhat.com>


> ---
>   include/hw/virtio/virtio.h | 2 +-
>   hw/virtio/virtio.c         | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> index b7ece7a6a89..8bab9cfb750 100644
> --- a/include/hw/virtio/virtio.h
> +++ b/include/hw/virtio/virtio.h
> @@ -43,7 +43,7 @@ typedef struct VirtIOFeature {
>       size_t end;
>   } VirtIOFeature;
>   
> -size_t virtio_feature_get_config_size(VirtIOFeature *features,
> +size_t virtio_feature_get_config_size(const VirtIOFeature *features,
>                                         uint64_t host_features);
>   
>   typedef struct VirtQueue VirtQueue;
> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
> index 9e13cb9e3ad..e02544b2df7 100644
> --- a/hw/virtio/virtio.c
> +++ b/hw/virtio/virtio.c
> @@ -2981,7 +2981,7 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val)
>       return ret;
>   }
>   
> -size_t virtio_feature_get_config_size(VirtIOFeature *feature_sizes,
> +size_t virtio_feature_get_config_size(const VirtIOFeature *feature_sizes,
>                                         uint64_t host_features)
>   {
>       size_t config_size = 0;



  reply	other threads:[~2021-05-12  2:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 10:41 [PATCH 0/3] hw/virtio: Constify VirtIOFeature Philippe Mathieu-Daudé
2021-05-11 10:41 ` [PATCH 1/3] hw/virtio: Pass virtio_feature_get_config_size() a const argument Philippe Mathieu-Daudé
2021-05-12  2:55   ` Jason Wang [this message]
2021-05-11 10:41 ` [PATCH 2/3] virtio-blk: Constify VirtIOFeature feature_sizes[] Philippe Mathieu-Daudé
2021-05-12  2:56   ` Jason Wang
2021-05-11 10:41 ` [PATCH 3/3] virtio-net: " Philippe Mathieu-Daudé
2021-05-12  2:57   ` Jason Wang
2021-05-11 16:54 ` [PATCH 0/3] hw/virtio: Constify VirtIOFeature Richard Henderson
2021-05-12  7:13 ` Stefano Garzarella
2021-05-12 15:54 ` Stefan Hajnoczi
2021-05-13 15:46 ` Laurent Vivier

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=fe8bbc8e-be18-a5db-414f-4008b07a6f36@redhat.com \
    --to=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).