linux/drivers/staging
Bhumika Goyal 4d79f43191 Staging: greybus: uart: constify tty_port_operations structure
Declare tty_port_operations structure as const as it is only stored in
the ops field of a tty_port structure which is a field of a gb_tty
structure. The ops field is of type const struct tty_port_operations *,
so tty_port_operations structures having this property can be
declared as const.
Done using Coccinelle:

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

@ok1@
identifier r1.i;
position p;
struct gb_tty q;
@@
q.port.ops=&i@p

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

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

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct tty_port_operations i;

File size before:
   text	   data	    bss	    dec	    hex	filename
   7646	    512	     56	   8214	   2016	drivers/staging/greybus/uart.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   7710	    448	     56	   8214	   2016	drivers/staging/greybus/uart.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Reviewed-by: David Lin <dtwlin@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17 09:38:37 +02:00
..
android staging: android: ion_test: remove extra line per checkpatch.pl 2016-10-16 10:24:50 +02:00
board
clocking-wizard
comedi staging: comedi: ni_mio_common: split out ao arming from ni_ao_inttrig 2016-10-16 10:26:17 +02:00
dgnc staging: dgnc: make find_board_by_major static 2016-10-16 10:25:05 +02:00
emxx_udc Staging: emxx_udc: constify usb_ep_ops structure 2016-10-16 10:25:08 +02:00
fbtft Staging: fbtft: Fix too many leading tabs warning 2016-10-16 10:26:14 +02:00
fsl-mc Staging/IIO patches for 4.9-rc1 2016-10-05 14:50:51 -07:00
fwserial Staging: fwserial: remove unused function fill_unplug_req 2016-10-16 10:25:09 +02:00
gdm724x
goldfish
greybus Staging: greybus: uart: constify tty_port_operations structure 2016-10-17 09:38:37 +02:00
gs_fpgaboot
i4l staging: i4l: pcbit: replace some include asm/*.h with linux/*.h 2016-10-16 10:27:26 +02:00
iio Staging: iio: light: constify attribute_group structures 2016-09-27 13:03:57 +02:00
ks7010 staging: ks7010: Fixes warning :do not add new typedefs 2016-10-16 10:27:39 +02:00
lustre Staging: lustre: indent an if statement 2016-10-16 10:27:40 +02:00
media Staging: media: lirc: Use unsigned int instead unsigned 2016-10-16 10:26:27 +02:00
most staging: most: hdm-usb: fix mbo buffer leak 2016-10-16 10:25:14 +02:00
mt29f_spinand
netlogic Staging: netlogic: Compress return logic into one line 2016-10-16 10:27:33 +02:00
nvec
octeon Staging: octeon: Add missing of_node_put after calling of_parse_phandle. 2016-09-20 13:51:24 +02:00
octeon-usb staging: octeon-usb: Remove unnecessary assignment 2016-09-22 11:54:48 +02:00
olpc_dcon Revert "staging: olpc_dcon: Replace a bit shift by a use of BIT." 2016-09-18 13:09:50 +02:00
rtl8188eu Staging: rtl8188eu: hal: Compress return logic into one line 2016-10-16 10:27:32 +02:00
rtl8192e Staging: rtl8192e: rtl_core: Constify rtllib_qos_parameters structures 2016-10-16 10:24:51 +02:00
rtl8192u staging: rtl8192u: remove unused functions in r8192U_core.c 2016-09-23 19:00:44 +02:00
rtl8712 Staging: rtl8712: remove unused functions 2016-10-16 10:24:51 +02:00
rts5208 staging: rts5208: rtsx.c: Alignment fix 2016-10-16 10:27:20 +02:00
skein Staging: skein: skein_api: Remove useless type conversion 2016-10-16 10:25:07 +02:00
slicoss staging: slicoss: cleaning up codestyle warnings 2016-09-27 13:08:04 +02:00
sm750fb staging: sm750fb: Remove unnecessary comments. 2016-10-16 10:27:37 +02:00
speakup Staging: speakup: constify attribute_group structures 2016-10-02 17:14:03 +02:00
unisys staging: unisys: visorbus: fix typos with client_bus_info /sys entry 2016-09-28 11:30:52 +02:00
vc04_services staging: vc04_services: don't print pointers directly 2016-10-16 10:26:11 +02:00
vme
vt6655 Staging: vt6655: Removes unused macros. 2016-10-16 10:27:30 +02:00
vt6656 staging:vt6656:card.c: fix block comments should align the * on each line 2016-10-16 10:27:27 +02:00
wilc1000 Staging: wilc1000: Compress return logic into one line 2016-10-16 10:27:34 +02:00
wlan-ng staging: wlan-ng: cfg80211: Remove unnecessary parentheses around variables 2016-10-16 10:26:25 +02:00
xgifb staging: xgifb: Remove unused variable and if statement 2016-09-22 11:54:47 +02:00
Kconfig staging: add bcm2708 vchiq driver 2016-10-02 15:40:04 +02:00
Makefile staging: add bcm2708 vchiq driver 2016-10-02 15:40:04 +02:00