Skip to content

Commit a024d70

Browse files
rikardfalkebornherbertx
authored andcommitted
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 <rikard.falkeborn@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent b242973 commit a024d70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/char/hw_random/virtio-rng.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static int virtrng_restore(struct virtio_device *vdev)
195195
}
196196
#endif
197197

198-
static struct virtio_device_id id_table[] = {
198+
static const struct virtio_device_id id_table[] = {
199199
{ VIRTIO_ID_RNG, VIRTIO_DEV_ANY_ID },
200200
{ 0 },
201201
};

0 commit comments

Comments
 (0)