diff options
| author | Bhumika Goyal <[email protected]> | 2016-09-27 14:47:12 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2016-09-27 13:06:55 +0200 |
| commit | af2708f5e8a82ddad80ff3f32102defd4ffd87d7 (patch) | |
| tree | b6a5d8d8472785f66a058c60ef4022287b411bd3 /tools/perf/scripts/python/bin/stackcollapse-record | |
| parent | cfb459edaa91d624e42a959f0356d341a3347c76 (diff) | |
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions