linux_dsm_epyc7002/drivers/remoteproc
Bhumika Goyal c008fad264 drivers: remoteproc: constify rproc_ops structures
Declare rproc_ops structures as const as they are only passed as an
argument to the function rproc_alloc. This argument is of type const, so
rproc_ops structures having this property can be declared const too.
Done using Coccinelle:

@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct rproc_ops i@p = {...};

@ok1@
identifier r1.i;
position p;
@@
rproc_alloc(...,&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 rproc_ops i;

File size details:

Size of the file remoteproc/da8xx_remoteproc.o remains the same before and
after applying the changes.

   text	   data	    bss	    dec	    hex	filename
   1312	    100	      4	   1416	    588 remoteproc/da8xx_remoteproc.o
   1312	    100	      4	   1416	    588 remoteproc/da8xx_remoteproc.o

    970	    240	      0	   1210	    4ba remoteproc/omap_remoteproc.o
   1002	    192	      0	   1194	    4aa remoteproc/omap_remoteproc.o

   1901	    240	      0	   2141	    85d remoteproc/st_remoteproc.o
   1933	    192	      0	   2125	    84d remoteproc/st_remoteproc.o

   1288	     96	      0	   1384	    568 remoteproc/st_slim_rproc.o
   1320	     64	      0	   1384	    568 remoteproc/st_slim_rproc.o

   2121	    240	      0	   2361	    939 remoteproc/wkup_m3_rproc.o
   2161	    192	      0	   2353	    931 remoteproc/wkup_m3_rproc.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2017-01-18 10:46:50 -08:00
..
da8xx_remoteproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00
Kconfig remoteproc: add some kind of help 2017-01-18 10:46:50 -08:00
Makefile remoteproc/ste: Delete unused driver 2016-12-09 16:16:54 -08:00
omap_remoteproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00
omap_remoteproc.h remoteproc/omap: add a remoteproc driver for OMAP4 2012-02-08 22:53:47 +02:00
qcom_adsp_pil.c remoteproc: Update last rproc_put users to rproc_free 2016-11-19 22:47:36 -08:00
qcom_mdt_loader.c remoteproc: qcom: mdt_loader: add include for sizes 2016-12-02 14:41:54 -08:00
qcom_mdt_loader.h remoteproc: qcom: Driver for the self-authenticating Hexagon v5 2016-07-13 13:38:15 -07:00
qcom_q6v5_pil.c remoteproc: qcom: Initialize and enable proxy and active regulators. 2017-01-18 10:46:50 -08:00
qcom_wcnss_iris.c remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
qcom_wcnss.c remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
qcom_wcnss.h remoteproc: qcom_wcnss: Fix circular module dependency 2016-11-14 21:52:19 -08:00
remoteproc_core.c Revert "remoteproc: Merge table_ptr and cached_table pointers" 2016-12-30 03:26:31 -08:00
remoteproc_debugfs.c remoteproc: debugfs: Remove state entry which is duplicated is sysfs 2016-10-31 17:24:48 -07:00
remoteproc_elf_loader.c remoteproc: align code with open parenthesis 2016-08-12 21:27:49 -07:00
remoteproc_internal.h remoteproc: Assign kref to rproc_vdev 2016-11-14 21:52:15 -08:00
remoteproc_sysfs.c remoteproc: Add a sysfs interface for firmware and state 2016-10-31 17:24:46 -07:00
remoteproc_virtio.c remoteproc: virtio: Anchor vring life cycle in vdev 2016-11-14 21:52:16 -08:00
st_remoteproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00
st_slim_rproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00
wkup_m3_rproc.c drivers: remoteproc: constify rproc_ops structures 2017-01-18 10:46:50 -08:00