提交 ab8d5319 编写于 作者: J Julia Lawall 提交者: Boris Brezillon

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: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
上级 90cc62f3
...@@ -97,7 +97,7 @@ static const struct of_device_id ebi_match[] = { ...@@ -97,7 +97,7 @@ static const struct of_device_id ebi_match[] = {
static int ap_flash_init(struct platform_device *pdev) static int ap_flash_init(struct platform_device *pdev)
{ {
struct device_node *ebi; struct device_node *ebi;
static void __iomem *ebi_base; void __iomem *ebi_base;
u32 val; u32 val;
int ret; int ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册