OpenCloudOS-Kernel/drivers/media/pci/mantis
Gustavo A. R. Silva e46ab9dc4a media: mantis: constify i2c_algorithm structure
Check for i2c_algorithm structures that are only stored in
the algo field of an i2c_adapter structure. This field is
declared const, so i2c_algorithm structures that have this
property can be declared as const also.

This issue was identified using Coccinelle and the following
semantic patch:

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

@ok@
identifier r.i;
struct i2c_adapter e;
position p;
@@
e.algo = &i@p;

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

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct i2c_algorithm i = { ... };

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-20 14:59:15 -04:00
..
Kconfig
Makefile
hopper_cards.c [media] mantis: cleanup CodingStyle issues due to last commit 2015-06-10 12:06:34 -03:00
hopper_vp3028.c [media] mantis: fix sparse warnings 2014-09-03 09:38:44 -03:00
hopper_vp3028.h
mantis_ca.c [media] mantis: cleanup NULL checking in mantis_ca_exit() 2012-12-27 20:25:38 -02:00
mantis_ca.h
mantis_cards.c [media] mantis: cleanup CodingStyle issues due to last commit 2015-06-10 12:06:34 -03:00
mantis_common.h [media] mantis: add remote control support 2015-06-10 11:58:24 -03:00
mantis_core.c [media] media: pci: mantis: mantis_core.c: Remove unused function 2015-01-27 10:10:06 -02:00
mantis_core.h
mantis_dma.c [media] mantis: remove an uneeded goto 2015-08-11 10:35:11 -03:00
mantis_dma.h
mantis_dvb.c [media] mantis_dvb: fix some error codes in mantis_dvb_init() 2017-02-03 14:50:35 -02:00
mantis_dvb.h
mantis_evm.c
mantis_hif.c
mantis_hif.h
mantis_i2c.c media: mantis: constify i2c_algorithm structure 2017-07-20 14:59:15 -04:00
mantis_i2c.h
mantis_input.c [media] rc-main: assign driver type during allocation 2017-01-30 13:59:57 -02:00
mantis_input.h [media] mantis: cleanup CodingStyle issues due to last commit 2015-06-10 12:06:34 -03:00
mantis_ioc.c
mantis_ioc.h
mantis_link.h
mantis_pci.c [media] pci: mantis: Remove redundant pci_set_drvdata 2013-10-17 06:01:32 -03:00
mantis_pci.h
mantis_pcmcia.c [media] mantis: add remote control support 2015-06-10 11:58:24 -03:00
mantis_reg.h
mantis_uart.c [media] mantis: cleanup CodingStyle issues due to last commit 2015-06-10 12:06:34 -03:00
mantis_uart.h
mantis_vp1033.c [media] mantis: fix sparse warnings 2014-09-03 09:38:44 -03:00
mantis_vp1033.h
mantis_vp1034.c [media] pci: mantis: constify mb86a16_config structure 2017-04-17 12:53:03 -03:00
mantis_vp1034.h [media] dvb: Get rid of typedev usage for enums 2015-06-09 17:47:35 -03:00
mantis_vp1041.c [media] mantis: fix sparse warnings 2014-09-03 09:38:44 -03:00
mantis_vp1041.h
mantis_vp2033.c [media] mantis: fix sparse warnings 2014-09-03 09:38:44 -03:00
mantis_vp2033.h
mantis_vp2040.c [media] mantis: fix sparse warnings 2014-09-03 09:38:44 -03:00
mantis_vp2040.h
mantis_vp3028.c
mantis_vp3028.h
mantis_vp3030.c [media] mantis: fix sparse warnings 2014-09-03 09:38:44 -03:00
mantis_vp3030.h