projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddac9c5
)
irqchip/gic/realview: Drop unnecessary static
author
Julia Lawall
<
[email protected]
>
Sat, 15 Jul 2017 20:07:40 +0000
(22:07 +0200)
committer
Thomas Gleixner
<
[email protected]
>
Tue, 18 Jul 2017 19:59:22 +0000
(21:59 +0200)
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 <
[email protected]
>
Signed-off-by: Thomas Gleixner <
[email protected]
>
Cc: Marc Zyngier <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Cc: Jason Cooper <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
drivers/irqchip/irq-gic-realview.c
patch
|
blob
|
history
diff --git
a/drivers/irqchip/irq-gic-realview.c
b/drivers/irqchip/irq-gic-realview.c
index 54c296401525c1a97df216c2cd045f64c7ce0d60..18d58d2b4ffeb8b50e2df2179e95e15f3185d033 100644
(file)
--- a/
drivers/irqchip/irq-gic-realview.c
+++ b/
drivers/irqchip/irq-gic-realview.c
@@
-43,7
+43,7
@@
static const struct of_device_id syscon_pldset_of_match[] = {
static int __init
realview_gic_of_init(struct device_node *node, struct device_node *parent)
{
- st
atic st
ruct regmap *map;
+ struct regmap *map;
struct device_node *np;
const struct of_device_id *gic_id;
u32 pld1_ctrl;