Skip to content

Commit cea9c8d

Browse files
JuliaLawallhtejun
authored andcommitted
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: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent cf8984b commit cea9c8d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/ata/sata_gemini.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
305305
struct device *dev = &pdev->dev;
306306
struct device_node *np = dev->of_node;
307307
struct sata_gemini *sg;
308-
static struct regmap *map;
308+
struct regmap *map;
309309
struct resource *res;
310310
enum gemini_muxmode muxmode;
311311
u32 gmode;

0 commit comments

Comments
 (0)