linux/drivers/media
Gustavo A. R. Silva 6efa094369 media: sir_ir: remove unnecessary static in sir_interrupt()
Remove unnecessary static on local variable delt.
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
   5009    3456     576    9041    2351 drivers/media/rc/sir_ir.o

after:
   text    data     bss     dec     hex filename
   4988    3400     512    8900    22c4 drivers/media/rc/sir_ir.o

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20 09:41:43 -04:00
..
cec media: cec-pin: fix irq handling 2017-08-20 08:15:00 -04:00
common media: v4l2-tpg: fix the SMPTE-2084 transfer function 2017-08-08 07:05:09 -04:00
dvb-core media: dvb-core/demux.h: fix kernel-doc warning 2017-07-21 08:01:08 -04:00
dvb-frontends media: dvb-frontends/cxd2841er: update moddesc wrt new chip support 2017-08-20 07:43:43 -04:00
firewire [media] firewire: don't break long lines 2016-10-21 10:06:00 -02:00
i2c media: ov13858: Limit vblank to permissible range 2017-08-20 08:35:11 -04:00
mmc
pci media: ivtv: Fix incompatible type for argument error 2017-08-20 08:26:33 -04:00
platform media: v4l: vsp1: Allow entities to participate in the partition algorithm 2017-08-20 09:32:49 -04:00
radio media: radio: constify pnp_device_id 2017-08-20 08:25:11 -04:00
rc media: sir_ir: remove unnecessary static in sir_interrupt() 2017-08-20 09:41:43 -04:00
spi [media] gs1662: drop kfree for memory allocated with devm_kzalloc 2016-10-24 17:59:08 -02:00
tuners media: tuners: make snd_pcm_hardware const 2017-08-20 08:05:25 -04:00
usb media: usb: rainshadow-cec: constify serio_device_id 2017-08-20 08:27:29 -04:00
v4l2-core media: Convert to using %pOF instead of full_name 2017-08-20 08:20:20 -04:00
Kconfig media: rc-core: do not depend on MEDIA_SUPPORT 2017-08-20 09:39:36 -04:00
Makefile [media] cec: select CEC_CORE instead of depend on it 2017-06-04 15:23:33 -03:00
media-device.c media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c media: Make parameter of media_entity_remote_pad() const 2017-07-20 16:54:04 -04:00