aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorJulia Lawall <julia.lawall@lip6.fr>2017-07-15 22:07:38 +0200
committerBoris Brezillon <boris.brezillon@free-electrons.com>2017-08-15 14:00:43 +0200
commitab8d531910e287c44f2fd584f5853426c287131c (patch)
tree7d2459500f9ea4c5a5dcf2475b10116782cfcb8a /drivers/mtd/maps
parentmtd: spear_smi: add NULL check on devm_kzalloc() return value (diff)
downloadlinux-dev-ab8d531910e287c44f2fd584f5853426c287131c.tar.xz
linux-dev-ab8d531910e287c44f2fd584f5853426c287131c.zip
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/) // <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> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/physmap_of_versatile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/maps/physmap_of_versatile.c b/drivers/mtd/maps/physmap_of_versatile.c
index 8c6ccded9be8..03f2b6e7bc7e 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;