[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ebb535d0-5cf2-7f5d-3781-a3f68fb77cce@redhat.com>
Date: Mon, 14 Sep 2020 09:46:15 +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 2/3] virtio_input: Constify id_table
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@...il.com>
> ---
> drivers/virtio/virtio_input.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/virtio/virtio_input.c b/drivers/virtio/virtio_input.c
> index 877b2ea3ed05..f1f6208edcf5 100644
> --- a/drivers/virtio/virtio_input.c
> +++ b/drivers/virtio/virtio_input.c
> @@ -363,7 +363,7 @@ static int virtinput_restore(struct virtio_device *vdev)
> static unsigned int features[] = {
> /* none */
> };
> -static struct virtio_device_id id_table[] = {
> +static const struct virtio_device_id id_table[] = {
> { VIRTIO_ID_INPUT, VIRTIO_DEV_ANY_ID },
> { 0 },
> };
>
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists