lkml.org 
[lkml]   [2017]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] misc: mic: constify virtio_config_ops structure
Date
This virtio_config_ops structure is only stored in the config field
of a virtio_device structure and this field is const, so the
virtio_config_ops structure can also be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
drivers/misc/mic/vop/vop_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mic/vop/vop_main.c b/drivers/misc/mic/vop/vop_main.c
index a341938..c05caa8 100644
--- a/drivers/misc/mic/vop/vop_main.c
+++ b/drivers/misc/mic/vop/vop_main.c
@@ -425,7 +425,7 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs,
/*
* 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,
.finalize_features = vop_finalize_features,
.get = vop_get,
\
 
 \ /
  Last update: 2017-08-14 07:51    [W:0.026 / U:0.788 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site