Bhumika Goyal 1d822a40b8 vhost: scsi: constify target_core_fabric_ops structures
Declare target_core_fabric_ops strucrues as const as they are only
passed as an argument to the functions target_register_template and
target_unregister_template. The arguments are of type const struct
target_core_fabric_ops *, so target_core_fabric_ops structures having
this property can be declared const.
Done using Coccinelle:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct target_core_fabric_ops i@p={...};

@ok@
position p;
identifier r.i;
@@
(
target_register_template(&i@p)
|
target_unregister_template(&i@p)
)
@bad@
position p!={r.p,ok.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
+const
struct target_core_fabric_ops i;

File size before: drivers/vhost/scsi.o
   text	   data	    bss	    dec	    hex	filename
  18063	   2985	     40	  21088	   5260	drivers/vhost/scsi.o

File size after: drivers/vhost/scsi.o
   text	   data	    bss	    dec	    hex	filename
  18479	   2601	     40	  21120	   5280	drivers/vhost/scsi.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
2017-01-19 23:46:29 +02:00
..
2016-12-25 10:47:44 +01:00
2017-01-11 09:14:19 +01:00
2017-01-06 14:34:52 +01:00
2016-12-18 15:49:10 -08:00
2017-01-06 10:49:36 -08:00
2016-12-25 10:47:44 +01:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-19 08:16:26 -08:00
2016-12-18 15:49:10 -08:00
2017-01-13 15:17:04 -07:00
2016-12-15 12:46:48 -08:00
2016-12-25 17:21:22 +01:00
2016-12-25 10:47:44 +01:00
2016-12-14 10:49:33 -08:00
2016-12-25 17:21:22 +01:00
2016-12-15 11:45:13 -08:00
2016-12-19 08:16:26 -08:00
2016-12-15 16:03:25 -08:00
2016-12-25 17:21:22 +01:00
2016-12-25 17:21:22 +01:00
2016-12-16 09:26:42 -08:00
2016-12-14 20:42:45 -08:00
2017-01-12 18:17:38 +01:00
2016-12-24 11:27:45 -08:00