From: David Hildenbrand <david@redhat.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 1/3] virtio-balloon: Constify id_table
Date: Mon, 14 Sep 2020 09:46:10 +0200 [thread overview]
Message-ID: <84eec652-68f6-f0de-ce9f-1e05c55ad7ab@redhat.com> (raw)
In-Reply-To: <20200911203509.26505-2-rikard.falkeborn@gmail.com>
On 11.09.20 22:35, Rikard Falkeborn wrote:
> id_table is not modified, so make it const to allow the compiler to put
> it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> drivers/virtio/virtio_balloon.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
> index 31cc97f2f515..481611c09dae 100644
> --- a/drivers/virtio/virtio_balloon.c
> +++ b/drivers/virtio/virtio_balloon.c
> @@ -128,7 +128,7 @@ struct virtio_balloon {
> struct page_reporting_dev_info pr_dev_info;
> };
>
> -static struct virtio_device_id id_table[] = {
> +static const struct virtio_device_id id_table[] = {
> { VIRTIO_ID_BALLOON, VIRTIO_DEV_ANY_ID },
> { 0 },
> };
>
Acked-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2020-09-14 7:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 20:35 [PATCH 0/3] drivers/virtio: Constify static struct virtio_device_id Rikard Falkeborn
2020-09-11 20:35 ` [PATCH 1/3] virtio-balloon: Constify id_table Rikard Falkeborn
2020-09-14 7:46 ` David Hildenbrand [this message]
2020-09-11 20:35 ` [PATCH 2/3] virtio_input: " Rikard Falkeborn
2020-09-14 7:46 ` David Hildenbrand
2020-09-11 20:35 ` [PATCH 3/3] virtio-mem: Constify mem_id_table Rikard Falkeborn
2020-09-14 7:46 ` David Hildenbrand
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=84eec652-68f6-f0de-ce9f-1e05c55ad7ab@redhat.com \
--to=david@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=rikard.falkeborn@gmail.com \
--cc=virtualization@lists.linux-foundation.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
all inboxes | Powered by JetHome®