[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170718013154.GB17424@codeaurora.org>
Date: Mon, 17 Jul 2017 18:31:54 -0700
From: Stephen Boyd <sboyd@...eaurora.org>
To: Julia Lawall <Julia.Lawall@...6.fr>
Cc: Michael Turquette <mturquette@...libre.com>, keescook@...omium.org,
kernel-janitors@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/11] clk: mmp: Drop unnecessary static
On 07/15, Julia Lawall wrote:
> 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@...6.fr>
>
> ---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists