All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch/mips: remove duplicate structure field initialization
@ 2009-09-21 15:08 ` Julia Lawall
  0 siblings, 0 replies; 12+ messages in thread
From: Julia Lawall @ 2009-09-21 15:08 UTC (permalink / raw)
  To: dmitri.vorobiev, ralf, linux-mips, linux-kernel, kernel-janitors

From: Julia Lawall <julia@diku.dk>

The definition of the irq_ipi structure has two initializations of the
flags field.  This combines them.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 arch/mips/kernel/smtc.c             |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 67153a0..4d181df 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -1098,9 +1098,8 @@ static void ipi_irq_dispatch(void)
 
 static struct irqaction irq_ipi = {
 	.handler	= ipi_interrupt,
-	.flags		= IRQF_DISABLED,
-	.name		= "SMTC_IPI",
-	.flags		= IRQF_PERCPU
+	.flags		= IRQF_DISABLED | IRQF_PERCPU,
+	.name		= "SMTC_IPI"
 };
 
 static void setup_cross_vpe_interrupts(unsigned int nvpe)

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-09-23  9:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-21 15:08 [PATCH] arch/mips: remove duplicate structure field initialization Julia Lawall
2009-09-21 15:08 ` Julia Lawall
2009-09-21 19:25 ` [PATCH] arch/mips: remove duplicate structure field Ralf Baechle
2009-09-21 19:25   ` [PATCH] arch/mips: remove duplicate structure field initialization Ralf Baechle
2009-09-21 20:23   ` Kevin D. Kissell
2009-09-21 20:23     ` Kevin D. Kissell
2009-09-21 20:41     ` Kevin D. Kissell
2009-09-21 20:41       ` Kevin D. Kissell
2009-09-21 20:55       ` [PATCH] arch/mips: remove duplicate structure field Ralf Baechle
2009-09-21 20:55         ` [PATCH] arch/mips: remove duplicate structure field initialization Ralf Baechle
2009-09-23  9:13     ` [PATCH] arch/mips: remove duplicate structure field Ralf Baechle
2009-09-23  9:13       ` [PATCH] arch/mips: remove duplicate structure field initialization Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.