Commit 8374680f authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Greg Kroah-Hartman

mic: vop: Constify static structs

vop_vq_config_ops and id_table[] are never modified so make them const
to allow the compiler to put them in read-only memory.

Before:
   text    data     bss     dec     hex filename
  14889    4065     192   19146    4aca drivers/misc/mic/vop/vop_main.o

After:
   text    data     bss     dec     hex filename
  15113    3841     192   19146    4aca drivers/misc/mic/vop/vop_main.o
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200610224704.27082-5-rikard.falkeborn@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 68daf1df
...@@ -438,7 +438,7 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, ...@@ -438,7 +438,7 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs,
/* /*
* The config ops structure as defined by virtio config * The config ops structure as defined by virtio config
*/ */
static struct virtio_config_ops vop_vq_config_ops = { static const struct virtio_config_ops vop_vq_config_ops = {
.get_features = vop_get_features, .get_features = vop_get_features,
.finalize_features = vop_finalize_features, .finalize_features = vop_finalize_features,
.get = vop_get, .get = vop_get,
...@@ -763,7 +763,7 @@ static void vop_driver_remove(struct vop_device *vpdev) ...@@ -763,7 +763,7 @@ static void vop_driver_remove(struct vop_device *vpdev)
kfree(vi); kfree(vi);
} }
static struct vop_device_id id_table[] = { static const struct vop_device_id id_table[] = {
{ VOP_DEV_TRNSP, VOP_DEV_ANY_ID }, { VOP_DEV_TRNSP, VOP_DEV_ANY_ID },
{ 0 }, { 0 },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment