| Date | Wed, 2 Aug 2017 08:12:59 -0700 | From | Tejun Heo <> | Subject | Re: [PATCH 08/11] ata: Drop unnecessary static |
| |
On Sat, Jul 15, 2017 at 10:07:43PM +0200, 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@lip6.fr>
Applied to libata/for-4.14.
Thanks.
-- tejun
|