[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdb=tu86y4HHNbQMw5USFqdxq74cm5pdxdBwQfpRQJbKGw@mail.gmail.com>
Date: Wed, 2 Aug 2017 13:58:41 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] soc: integrator: remove unnecessary static in integrator_soc_init()
On Thu, Jul 20, 2017 at 12:39 AM, Gustavo A. R. Silva
<gustavo@...eddedor.com> 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 <gustavo@...eddedor.com>
Acked-by: Linus Walleij <linus.walleij@...aro.org>
You probably want to funnel this patch through the ARM SoC tree.
Yours,
Linus Walleij
Powered by blists - more mailing lists