Commit cea9c8d3 authored by Julia Lawall's avatar Julia Lawall Committed by Tejun Heo

ata: 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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent cf8984bf
...@@ -305,7 +305,7 @@ static int gemini_sata_probe(struct platform_device *pdev) ...@@ -305,7 +305,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node; struct device_node *np = dev->of_node;
struct sata_gemini *sg; struct sata_gemini *sg;
static struct regmap *map; struct regmap *map;
struct resource *res; struct resource *res;
enum gemini_muxmode muxmode; enum gemini_muxmode muxmode;
u32 gmode; u32 gmode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment