From: Rikard Falkeborn Date: Wed, 1 Jul 2020 20:09:48 +0000 (+0200) Subject: hwrng: virtio - Constify id_table[] X-Git-Tag: block-5.9-2020-08-14~87^2~99 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a024d70ae29825b117f2c80c53345053f074cdc1;p=linux-2.6-block.git hwrng: virtio - Constify id_table[] id_table[] is not modified and an be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 1746 192 8 1946 79a drivers/char/hw_random/virtio-rng.o After: text data bss dec hex filename 1762 176 8 1946 79a drivers/char/hw_random/virtio-rng.o Signed-off-by: Rikard Falkeborn Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index 79a6e47b5fbc..a90001e02bf7 100644 --- a/drivers/char/hw_random/virtio-rng.c +++ b/drivers/char/hw_random/virtio-rng.c @@ -195,7 +195,7 @@ static int virtrng_restore(struct virtio_device *vdev) } #endif -static struct virtio_device_id id_table[] = { +static const struct virtio_device_id id_table[] = { { VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID }, { 0 }, };