summaryrefslogtreecommitdiff
path: root/drivers/ata/sata_gemini.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2017-07-15 23:07:43 +0300
committerTejun Heo <tj@kernel.org>2017-08-02 18:11:53 +0300
commitcea9c8d34464fb11c82bd32b4cd57b9fcc834995 (patch)
tree573132b63c2ed87c2744231749d65df81c919ca5 /drivers/ata/sata_gemini.c
parentcf8984bf84c383ca1a7282bc6409c9684e6dc3a4 (diff)
downloadlinux-cea9c8d34464fb11c82bd32b4cd57b9fcc834995.tar.xz
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>
Diffstat (limited to 'drivers/ata/sata_gemini.c')
-rw-r--r--drivers/ata/sata_gemini.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/sata_gemini.c b/drivers/ata/sata_gemini.c
index 8c704523bae7..ab97be63d196 100644
--- a/drivers/ata/sata_gemini.c
+++ b/drivers/ata/sata_gemini.c
@@ -305,7 +305,7 @@ static int gemini_sata_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
struct sata_gemini *sg;
- static struct regmap *map;
+ struct regmap *map;
struct resource *res;
enum gemini_muxmode muxmode;
u32 gmode;