kernel_optimize_test/drivers/media/pci/netup_unidvb
Julia Lawall 10accd2e68 [media] pci: constify vb2_ops structures
Check for vb2_ops structures that are only stored in the ops field of a
vb2_queue structure.  That field is declared const, so vb2_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct vb2_ops i@p = { ... };

@ok@
identifier r.i;
struct vb2_queue e;
position p;
@@
e.ops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct vb2_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct vb2_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-19 16:21:42 -03:00
..
Kconfig [media] Add support Sony HELENE Sat/Ter Tuner 2016-06-07 12:04:27 -03:00
Makefile
netup_unidvb_ci.c [media] Fix CAM module memory read/write 2016-06-07 12:10:58 -03:00
netup_unidvb_core.c [media] pci: constify vb2_ops structures 2016-09-19 16:21:42 -03:00
netup_unidvb_i2c.c [media] media: pci: netup_unidvb: don't print error when adding adapter fails 2016-08-24 13:56:59 -03:00
netup_unidvb_spi.c media updates for v4.4-rc1 2015-11-05 12:05:15 -08:00
netup_unidvb.h [media] New hw revision 1.4 of NetUP Universal DVB card added 2016-06-07 12:10:30 -03:00