linux/drivers/iio/orientation
Julia Lawall 50db2cd408 iio: orientation: hid-sensor-rotation: Drop unnecessary static
Drop static on a local variable, when the variable is initialized before
any possible use.  Thus, the static has no benefit.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@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;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2017-07-17 21:45:01 +01:00
..
hid-sensor-incl-3d.c iio: orientation: hid-sensor-incl-3d: Fix memory leak in probe() 2015-05-17 09:10:14 +01:00
hid-sensor-rotation.c iio: orientation: hid-sensor-rotation: Drop unnecessary static 2017-07-17 21:45:01 +01:00
Kconfig
Makefile