From: Julia Lawall Date: Sat, 15 Jul 2017 20:07:38 +0000 (+0200) Subject: mtd: physmap_of: Drop unnecessary static X-Git-Tag: v4.14-rc1~73^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab8d531910e287c44f2fd584f5853426c287131c;p=platform%2Fkernel%2Flinux-exynos.git mtd: physmap_of: 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/) // @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; // Signed-off-by: Julia Lawall Signed-off-by: Boris Brezillon --- diff --git a/drivers/mtd/maps/physmap_of_versatile.c b/drivers/mtd/maps/physmap_of_versatile.c index 8c6ccde..03f2b6e 100644 --- a/drivers/mtd/maps/physmap_of_versatile.c +++ b/drivers/mtd/maps/physmap_of_versatile.c @@ -97,7 +97,7 @@ static const struct of_device_id ebi_match[] = { static int ap_flash_init(struct platform_device *pdev) { struct device_node *ebi; - static void __iomem *ebi_base; + void __iomem *ebi_base; u32 val; int ret;