3 // Case 1: search for irq functions where interrupt.h is not used
4 // these might be ok as is, because some definitions of request_irq still
5 // have the pt_regs parameter in the signature
10 #include <linux/interrupt.h>
12 @ rule2 depends on !rule1 @
20 request_irq(irq, handler, irqflags, devname, dev_id)
23 identifier rule2.handler, irq, dev, regs;
26 * handler(int irq, void *dev, struct pt_regs *regs)
29 // ----------------------------------------------------------------------
31 // Case 2: the function is not static. This only works when there is no
32 // static handler function in the file, but fortunately this is the case
33 // (we have detected this by actually doing the transformation, which makes
34 // the second rule no longer match; unfortunately there is no disjunction
35 // at the function level)
37 @ rule3 depends on rule1 @
45 request_irq(irq, handler, irqflags, devname, dev_id)
49 identifier rule3.handler, irq, dev, regs;
52 static irqreturn_t handler(int irq, void *dev, struct pt_regs *regs)
55 @ rule5 depends on !rule4 @
56 identifier rule3.handler, irq, dev, regs;
59 * handler(int irq, void *dev, struct pt_regs *regs)
62 // ----------------------------------------------------------------------
64 // Case 3: the code contains a reference to the regs parameter
67 identifier rule3.handler, irq, dev, regs;
71 handler(int irq, void *dev, struct pt_regs *regs)