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:
512f9e7
)
irqchip/mips-cpu: Drop unnecessary static
author
Julia Lawall
<
[email protected]
>
Sat, 15 Jul 2017 20:07:41 +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-mips-cpu.c
patch
|
blob
|
history
diff --git
a/drivers/irqchip/irq-mips-cpu.c
b/drivers/irqchip/irq-mips-cpu.c
index 0a8ed1c05518a9f7c2b08761338c9bcc56258985..14461cbfab2fa234d365a947cc4e3d68e90378ed 100644
(file)
--- a/
drivers/irqchip/irq-mips-cpu.c
+++ b/
drivers/irqchip/irq-mips-cpu.c
@@
-154,7
+154,7
@@
asmlinkage void __weak plat_irq_dispatch(void)
static int mips_cpu_intc_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hw)
{
- st
atic st
ruct irq_chip *chip;
+ struct irq_chip *chip;
if (hw < 2 && cpu_has_mipsmt) {
/* Software interrupts are used for MT/CMT IPI */