[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4fe879b1-77de-4e88-773d-8836f9170f87@redhat.com>
Date: Mon, 14 Sep 2020 09:46:03 +0200
From: David Hildenbrand <david@...hat.com>
To: Rikard Falkeborn <rikard.falkeborn@...il.com>,
virtualization@...ts.linux-foundation.org
Cc: linux-kernel@...r.kernel.org,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>
Subject: Re: [PATCH 3/3] virtio-mem: Constify mem_id_table
On 11.09.20 22:35, Rikard Falkeborn wrote:
> mem_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@...il.com>
> ---
> drivers/virtio/virtio_mem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
> index 834b7c13ef3d..1d0f3ab2b509 100644
> --- a/drivers/virtio/virtio_mem.c
> +++ b/drivers/virtio/virtio_mem.c
> @@ -1926,7 +1926,7 @@ static unsigned int virtio_mem_features[] = {
> #endif
> };
>
> -static struct virtio_device_id virtio_mem_id_table[] = {
> +static const struct virtio_device_id virtio_mem_id_table[] = {
> { VIRTIO_ID_MEM, VIRTIO_DEV_ANY_ID },
> { 0 },
> };
>
Acked-by: David Hildenbrand <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists