]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
virtio-balloon: Constify id_table
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Fri, 11 Sep 2020 20:35:07 +0000 (22:35 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 21 Oct 2020 14:34:08 +0000 (10:34 -0400)
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-2-rikard.falkeborn@gmail.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
drivers/virtio/virtio_balloon.c

index 31cc97f2f515e5b5016b220bd246ddc40277517c..481611c09dae1cc3d850214d8806d54434f84bb6 100644 (file)
@@ -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 },
 };