linux-stable/drivers/media
Gustavo A. R. Silva 6ad33dec83 media: tuners: remove unnecessary static in simple_dvb_configure()
Remove unnecessary static on local variable t_params.
Such variable is initialized before being used,
on every execution path throughout the function.
The static has no benefit and, removing it reduces
the code size.

This issue was detected using Coccinelle and the following semantic patch:

@bad exists@
position p;
identifier x;
type T;
@@

static T x@p;
...
x = <+...x...+>

@@
identifier x;
expression e;
type T;
position p != bad.p;
@@

-static
 T x@p;
 ... when != x
     when strict
?x = e;

In the following log you can see the difference in the code size. Also,
there is a significant difference in the bss segment. This log is the
output of the size command, before and after the code change:

before:
   text    data     bss     dec     hex filename
  23314    3640     832   27786    6c8a drivers/media/tuners/tuner-simple.o

after:
   text    data     bss     dec     hex filename
  23257    3552     768   27577    6bb9 drivers/media/tuners/tuner-simple.o

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-19 15:02:27 -04:00
..
cec media: cec: drop senseless message 2017-07-18 13:00:26 -03:00
common [media] b2c2: constify nxt200x_config structure 2017-04-17 12:18:18 -03:00
dvb-core Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
dvb-frontends media: dvb-frontends/stv0367: Improve DVB-C/T frontend status 2017-06-25 10:48:45 -03:00
firewire
i2c media: media/i2c/saa717x: fix spelling mistake: "implementd" -> "implemented" 2017-07-19 15:00:57 -04:00
mmc
pci media: cx23885: add const to v4l2_file_operations structure 2017-07-19 14:56:41 -04:00
platform media: media/platform: add const to v4l2_file_operations structures 2017-07-19 14:56:19 -04:00
radio Linux v4.13-rc1 2017-07-17 11:17:36 -03:00
rc [media] rc-core: cleanup rc_register_device pt2 2017-06-13 13:55:01 -03:00
spi
tuners media: tuners: remove unnecessary static in simple_dvb_configure() 2017-07-19 15:02:27 -04:00
usb media: pulse8-cec/rainshadow-cec: make adapter name unique 2017-07-18 13:00:52 -03:00
v4l2-core media: vb2 dma-sg: Constify dma_buf_ops structures 2017-07-19 14:59:24 -04:00
Kconfig media: cec-pin: add low-level pin hardware support 2017-07-18 12:57:18 -03:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c
media-devnode.c
media-entity.c [media] media: entity: Catch unbalanced media_pipeline_stop calls 2017-06-23 09:23:36 -03:00