All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] ensure arguments to request_irq and free_irq are compatible
@ 2012-03-11 19:36 ` Julia Lawall
  0 siblings, 0 replies; 56+ messages in thread
From: Julia Lawall @ 2012-03-11 19:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernel-janitors

As far as I can see, free_irq does nothing if its second argument is not
the same as the last argument of the corresponding call to request_irq.
These were found using the semantic match below (http://coccinelle.lip6.fr/).
This semantic match finds a number of other cases, but they are mostly in
platform driver probe functions, so the functions should be just converted
to use devm functions, eliminating the need to call free_irq at all.

// <smpl>
@r exists@
expression e,e1,e2,e3,e4,e5;
type T;
position p1,p2;
@@

request_irq@p1(e1,e2,e3,e4,e5)
...
(
 free_irq(e1,(T)e5);
|
free_irq@p2(e1,e);
)

@bad1 exists@
position r.p1,r.p2;
expression e1,e2,e3,e4,e5;
@@

request_irq@p1(e1,e2,e3,e4,(void *)e5)
...
free_irq@p2(e1,e5);

@bad2 exists@
position r.p1,r.p2;
statement S;
@@

if (request_irq@p1(...)) S else { <+... free_irq@p2(...); ...+> }

@script:python depends on !bad1 && !bad2@
p1 << r.p1;
p2 << r.p2;
@@

cocci.print_main("",p1)
cocci.print_secs("",p2)
// </smpl>


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

end of thread, other threads:[~2012-03-21 18:37 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-11 19:36 [PATCH 0/7] ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-11 19:36 ` Julia Lawall
2012-03-11 19:36 ` [PATCH 1/7] drivers/video/pvr2fb.c: " Julia Lawall
2012-03-11 19:36   ` Julia Lawall
2012-03-21 18:37   ` Florian Tobias Schandinat
2012-03-11 19:36 ` [PATCH 2/7] drivers/scsi/arm/{cumana_2,eesox,powertec}.c: ensure arguments to request_irq and free_i Julia Lawall
2012-03-11 19:36   ` [PATCH 2/7] drivers/scsi/arm/{cumana_2, eesox, powertec}.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-11 19:36   ` [PATCH 2/7] drivers/scsi/arm/{cumana_2,eesox,powertec}.c: " Julia Lawall
2012-03-11 19:36 ` [PATCH 3/7] drivers/net/irda/{ali-ircc,via-ircc,w83977af-ir}.c: ensure arguments to request_irq and Julia Lawall
2012-03-11 19:36   ` [PATCH 3/7] drivers/net/irda/{ali-ircc,via-ircc,w83977af-ir}.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-11 21:49   ` [PATCH 3/7] drivers/net/irda/{ali-ircc,via-ircc,w83977af-ir}.c: ensure arguments to request_irq and Julia Lawall
2012-03-11 21:49     ` [PATCH 3/7] drivers/net/irda/{ali-ircc,via-ircc,w83977af-ir}.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-11 22:42     ` [PATCH 3/7] drivers/net/irda/{ali-ircc,via-ircc,w83977af-ir}.c: ensure arguments to David Miller
2012-03-11 22:42       ` [PATCH 3/7] drivers/net/irda/{ali-ircc,via-ircc,w83977af-ir}.c: ensure arguments to request_irq and free_irq are compatible David Miller
2012-03-11 19:36 ` [PATCH 4/7] arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are Julia Lawall
2012-03-11 19:36   ` [PATCH 4/7] arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-15  6:14   ` [PATCH 4/7] arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq Paul Mundt
2012-03-15  6:14     ` [PATCH 4/7] arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible Paul Mundt
2012-03-11 19:36 ` [PATCH 5/7] drivers/atm/eni.c: " Julia Lawall
2012-03-11 19:36   ` Julia Lawall
2012-03-11 20:58   ` Chas Williams (CONTRACTOR)
2012-03-11 20:58     ` Chas Williams (CONTRACTOR)
2012-03-11 21:08     ` Julia Lawall
2012-03-11 21:08       ` Julia Lawall
2012-03-11 21:16     ` Julia Lawall
2012-03-11 21:16       ` Julia Lawall
2012-03-11 22:42       ` David Miller
2012-03-11 22:42         ` David Miller
2012-03-11 19:36 ` [PATCH 6/7] drivers/input/touchscreen/hp680_ts_input.c: ensure arguments to request_irq and free_irq Julia Lawall
2012-03-11 19:36   ` [PATCH 6/7] drivers/input/touchscreen/hp680_ts_input.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-11 23:06   ` [PATCH 6/7] drivers/input/touchscreen/hp680_ts_input.c: ensure arguments to request_irq and free Dmitry Torokhov
2012-03-11 23:06     ` [PATCH 6/7] drivers/input/touchscreen/hp680_ts_input.c: ensure arguments to request_irq and free_irq are compatible Dmitry Torokhov
2012-03-11 19:36 ` [PATCH 7/7] arch/unicore32/kernel/dma.c: " Julia Lawall
2012-03-11 19:36   ` Julia Lawall
2012-03-12  0:58   ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Guan Xuetao
2012-03-12  0:58     ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Guan Xuetao
2012-03-12  5:27     ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Julia Lawall
2012-03-12  5:27       ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-13  7:10       ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Guan Xuetao
2012-03-13  7:10         ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Guan Xuetao
2012-03-13  8:23         ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Julia Lawall
2012-03-13  8:23           ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-14  8:07           ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Guan Xuetao
2012-03-14  8:07             ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Guan Xuetao
2012-03-14  8:19             ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Dan Carpenter
2012-03-14  8:19               ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Dan Carpenter
2012-03-14  8:42               ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Guan Xuetao
2012-03-14  8:42                 ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Guan Xuetao
2012-03-14  9:23                 ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Julia Lawall
2012-03-14  9:23                   ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-15  1:01                   ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Guan Xuetao
2012-03-15  1:01                     ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Guan Xuetao
2012-03-15  6:10                     ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat Julia Lawall
2012-03-15  6:10                       ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible Julia Lawall
2012-03-15  8:07                       ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compat walter harms
2012-03-15  8:07                         ` [PATCH 7/7] arch/unicore32/kernel/dma.c: ensure arguments to request_irq and free_irq are compatible walter harms

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.