summaryrefslogtreecommitdiff
path: root/drivers/virtio
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2020-09-11 23:35:09 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-10-21 17:34:10 +0300
commit7ab4de60028e0e9669b72a5f69f2080f98069b04 (patch)
tree415928916fd8f1c14f31b5dc527eafd17ed2635e /drivers/virtio
parent7f90611693f08f6b29209bd8d704ee17cbe003a0 (diff)
downloadlinux-7ab4de60028e0e9669b72a5f69f2080f98069b04.tar.xz
virtio-mem: Constify mem_id_table
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@gmail.com> Link: https://lore.kernel.org/r/20200911203509.26505-4-rikard.falkeborn@gmail.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'drivers/virtio')
-rw-r--r--drivers/virtio/virtio_mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index c08512fcea90..8b6059dbc743 100644
--- a/drivers/virtio/virtio_mem.c
+++ b/drivers/virtio/virtio_mem.c
@@ -1957,7 +1957,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 },
};