On Thu, Jul 20, 2017 at 12:39 AM, Gustavo A. R. Silva
<[email protected]> wrote:

> Remove unnecessary static on local variable syscon_regmap.
> Such variables are initialized before being used, on every
> execution path throughout the functions. So, the static has
> no benefit.
>
> 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;
>
> Signed-off-by: Gustavo A. R. Silva <[email protected]>

Acked-by: Linus Walleij <[email protected]>

You probably want to funnel this patch through the ARM SoC tree.

Yours,
Linus Walleij

Reply via email to