linux/drivers/staging
Bhumika Goyal af2708f5e8 Staging: most: aim-v4l2: constify v4l2_file_operations structures
Check for v4l2_file_operations structures that are only stored in the
fops field of video_device structures. As this field is constant, so
v4l2_file_operations structures having this property can also be
declared constant.
Done using coccinelle:

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

@ok1@
identifier r1.i;
position p;
struct video_device x;
@@
x.fops=&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 v4l2_file_operations i={...};

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

File size before:
   text	   data	    bss	    dec	    hex	filename
   5608	    160	      4	   5772	   168c
drivers/staging/most/aim-v4l2/video.o

File size after:
   text	   data	    bss	    dec	    hex	filename
   5696	     96	      4	   5796	   16a4
drivers/staging/most/aim-v4l2/video.o

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27 13:06:55 +02:00
..
android staging: ion: Align cases with switch 2016-09-25 12:37:14 +02:00
board
clocking-wizard
comedi staging: comedi: Use vma_pages function on vma object instead of explicit computation 2016-09-20 14:01:21 +02:00
dgnc staging: dgnc: Fix comment alignment 2016-09-25 19:27:04 +02:00
emxx_udc staging: emxx_udc: add braces to if-else block 2016-09-16 10:10:34 +02:00
fbtft Staging: fbtft: Use !x instead of x == NULL. 2016-09-18 12:38:27 +02:00
fsl-mc Staging: fsl-mc: Use !x instead of x == NULL. 2016-09-20 13:52:51 +02:00
fwserial staging: fwserial: fix checkpatch permission warnings 2016-09-13 15:44:46 +02:00
gdm724x staging: gdm724x: Remove unnecessary blank line 2016-09-16 10:10:34 +02:00
goldfish
greybus greybus: manifest: style fix missing space before '(' 2016-09-27 12:59:51 +02:00
gs_fpgaboot staging: gs_fpgaboot: Remove FSF address from GPL notice 2016-09-16 10:10:34 +02:00
i4l staging: i4l: act2000: Move assignment out of if statement 2016-09-20 13:46:32 +02:00
iio Staging: iio: light: constify attribute_group structures 2016-09-27 13:03:57 +02:00
ks7010 staging: ks7010: Use __packed over __attribute__((packed)) 2016-09-27 13:03:58 +02:00
lustre staging: lustre: llite: add missing LMV_MAGIC_V1 case 2016-09-27 13:01:21 +02:00
media staging: media: cxd2099: replace printk with dev_info 2016-09-20 13:59:45 +02:00
most Staging: most: aim-v4l2: constify v4l2_file_operations structures 2016-09-27 13:06:55 +02:00
mt29f_spinand
netlogic Staging: netlogic: Remove unused function 2016-09-16 10:10:34 +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: core: rtw_security: Remove return statement from void function 2016-09-25 12:42:35 +02:00
rtl8192e staging: rtl8192e: fixed block comments should align the * on each line 2016-09-26 22:22:14 +02:00
rtl8192u staging: rtl8192u: remove unused functions in r8192U_core.c 2016-09-23 19:00:44 +02:00
rtl8712 staging: rtl8172: usb_intf.c: Fixed block comment coding style 2016-09-26 22:22:13 +02:00
rts5208 staging: rts5208: fix style warnings in xd.c 2016-09-25 12:40:30 +02:00
skein
slicoss staging: slicoss: Move NULL test closer to assignment 2016-09-22 11:54:48 +02:00
sm750fb staging: sm750fb: Remove unnecessary parentheses 2016-09-22 11:54:48 +02:00
speakup Staging: speakup: kobjects: Add space around the operator. 2016-09-22 12:01:14 +02:00
unisys staging: unisys: visorbus: Convert visorchannel_signalinsert() return val 2016-09-27 13:06:16 +02:00
vme drivers: staging: vme: convert to octal notation for permission bits 2016-09-17 23:36:53 +02:00
vt6655 Staging: vt6655: baseband: Remove unnecessary space after a cast 2016-09-20 13:59:46 +02:00
vt6656 staging: vt6656: usbpipe.c: Fix checkpatch warning 2016-08-30 19:09:47 +02:00
wilc1000 staging: wilc1000: fix sparse warning: symbol was not declared. Should it be static? 2016-09-27 13:02:06 +02:00
wlan-ng staging: wlan-ng: fix block comments style errors 2016-09-25 19:54:45 +02:00
xgifb staging: xgifb: Remove unused variable and if statement 2016-09-22 11:54:47 +02:00
Kconfig Merge branch 'greybus' into staging-testing 2016-09-19 19:34:33 +02:00
Makefile Merge branch 'greybus' into staging-testing 2016-09-19 19:34:33 +02:00