linux-stable/drivers/usb/musb
Bhumika Goyal 1e572aa568 usb: musb: constify musb_hdrc_config structures
Declare musb_hdrc_config structures as const as they are only stored in
the config field of a musb_hdrc_platform_data structure. This field is of
type const, so musb_hdrc_config structures having this property can be
made const too.
Done using Coccinelle:

@r disable optional_qualifier@
identifier x;
position p;
@@
static struct musb_hdrc_config x@p={...};

@ok@
struct musb_hdrc_platform_data pdata;
identifier r.x;
position p;
@@
pdata.config=&x@p;

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

@depends on !bad disable optional_qualifier@
identifier r.x;
@@
+const
struct musb_hdrc_config x;

File size before:
   text	   data	    bss	    dec	    hex	filename
   1212	    338	      0	   1550	    60e	drivers/usb/musb/jz4740.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   1268	    290	      0	   1558	    616	drivers/usb/musb/jz4740.o

File size before:
   text	   data	    bss	    dec	    hex	filename
   6151	    333	     16	   6500	   1964	drivers/usb/musb/sunxi.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   6215	    269	     16	   6500	   1964	drivers/usb/musb/sunxi.o

File size before:
   text	   data	    bss	    dec	    hex	filename
   3668	    864	      0	   4532	   11b4	drivers/usb/musb/ux500.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   3724	    808	      0	   4532	   11b4	drivers/usb/musb/ux500.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-25 10:52:43 +01:00
..
am35x.c usb: musb: am35x: fix error return code in am35x_probe() 2016-09-13 17:20:02 +02:00
blackfin.c usb: musb: blackfin: add bfin_fifo_offset in bfin_ops 2017-01-05 19:18:05 +01:00
blackfin.h
cppi_dma.c usb: musb: cleanup cppi_dma header 2016-07-17 08:23:57 +09:00
cppi_dma.h usb: musb: cppi41: move struct cppi41_dma_channel to header 2016-07-17 08:23:57 +09:00
da8xx.c usb: musb: da8xx: Set phy in OTG mode by default 2016-11-21 17:35:37 +01:00
davinci.c usb: musb: Set up function pointers for DMA 2015-05-07 13:35:51 -05:00
davinci.h
jz4740.c usb: musb: constify musb_hdrc_config structures 2017-01-25 10:52:43 +01:00
Kconfig Merge 4.8-rc7 into usb-next 2016-09-19 09:12:41 +02:00
Makefile usb: musb: add tracepoints support for debugging 2016-07-17 08:23:57 +09:00
musb_am335x.c usb: musb: Fix panic upon musb_am335x module removal 2014-06-27 10:53:06 -05:00
musb_core.c usb: musb: fix compilation warning on unused function 2017-01-05 19:18:05 +01:00
musb_core.h usb: musb: core: add clear_ep_rxintr() to musb_platform_ops 2017-01-05 19:18:05 +01:00
musb_cppi41.c ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
musb_debug.h usb: musb: add tracepoints support for debugging 2016-07-17 08:23:57 +09:00
musb_debugfs.c usb: musb: fix runtime PM in debugfs 2017-01-10 18:26:19 +01:00
musb_dma.h usb: musb: Set up function pointers for DMA 2015-05-07 13:35:51 -05:00
musb_dsps.c usb: musb: dsps: implement clear_ep_rxintr() callback 2017-01-05 19:18:05 +01:00
musb_gadget.c Merge 4.9-rc7 into usb-next 2016-11-28 08:34:10 +01:00
musb_gadget.h
musb_gadget_ep0.c usb: musb: switch dev_dbg to tracepoints 2016-07-17 08:23:57 +09:00
musb_host.c usb: musb: core: add clear_ep_rxintr() to musb_platform_ops 2017-01-05 19:18:05 +01:00
musb_host.h usb: musb: fix prototype for musb_port_reset 2013-12-20 15:05:43 -06:00
musb_io.h usb: musb: Make busctl_offset an io-op rather then a define 2015-05-26 10:46:54 -05:00
musb_regs.h usb: musb: Make busctl_offset an io-op rather then a define 2015-05-26 10:46:54 -05:00
musb_trace.c usb: musb: add tracepoints support for debugging 2016-07-17 08:23:57 +09:00
musb_trace.h usb: musb: cppi41: add dma channel tracepoints 2016-07-17 08:23:57 +09:00
musb_virthub.c USB: musb: remove obsolete resume-signalling comments 2016-11-21 17:35:36 +01:00
musbhsdma.c usb: musb: switch dev_dbg to tracepoints 2016-07-17 08:23:57 +09:00
musbhsdma.h usb: musb: Fix trying to free already-free IRQ 4 2017-01-05 19:18:05 +01:00
omap2430.c Merge 4.9-rc7 into usb-next 2016-11-28 08:34:10 +01:00
omap2430.h
sunxi.c usb: musb: constify musb_hdrc_config structures 2017-01-25 10:52:43 +01:00
tusb6010.c usb: musb: Fix PM for hub disconnect 2016-11-17 16:25:39 +01:00
tusb6010.h usb: musb: Fix up DMA related macros 2015-05-07 13:35:46 -05:00
tusb6010_omap.c usb: musb: use %pad format string from dma_addr_t 2016-03-04 15:14:30 +02:00
ux500.c usb: musb: constify musb_hdrc_config structures 2017-01-25 10:52:43 +01:00
ux500_dma.c usb: musb/ux500: remove duplicate check for dma_is_compatible 2016-03-04 15:14:30 +02:00