diff options
| author | Bhumika Goyal <bhumirks@gmail.com> | 2017-01-21 12:37:25 +0300 | 
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-02-03 19:23:39 +0300 | 
| commit | 8b6fe20a5d7bc467865adb08c5abcf9e712cdc39 (patch) | |
| tree | ae965e86394c9fb993040b9c900968fbd7575f95 /lib/mpi/mpi-internal.h | |
| parent | 909aa003eb7239161f0fa5773878035ed1754cf4 (diff) | |
| download | linux-8b6fe20a5d7bc467865adb08c5abcf9e712cdc39.tar.xz | |
[media] media: pci: constify vb2_ops structure
Declare vb2_ops structure as const as it is only stored in
the ops field of a vb2_queue structure. This field is of type
const, so vb2_ops structures having same properties can be made
const too.
Done using Coccinelle:
@r1 disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p={...};
@ok1@
identifier r1.i;
position p;
struct sta2x11_vip vip;
struct vb2_queue q;
@@
(
vip.vb_vidq.ops=&i@p
|
q.ops=&i@p
)
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct vb2_ops i;
File size before:
   text	   data	    bss	    dec	    hex	filename
   8448	    440	      0	   8888	   22b8	media/pci/sta2x11/sta2x11_vip.o
File size after:
   text	   data	    bss	    dec	    hex	filename
   8552	    352	      0	   8904	   22c8	media/pci/sta2x11/sta2x11_vip.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions
