dm table: reject devices without request fns
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / scripts / coccinelle / iterators / fen.cocci
blob77bc108c3f597b715850465c0a5fa26333132bec
1 /// These iterators only exit normally when the loop cursor is NULL, so there
2 /// is no point to call of_node_put on the final value.
3 ///
4 // Confidence: High
5 // Copyright: (C) 2010 Nicolas Palix, DIKU.  GPLv2.
6 // Copyright: (C) 2010 Julia Lawall, DIKU.  GPLv2.
7 // Copyright: (C) 2010 Gilles Muller, INRIA/LiP6.  GPLv2.
8 // URL: http://coccinelle.lip6.fr/
9 // Comments:
10 // Options: -no_includes -include_headers
12 virtual patch
15 iterator name for_each_node_by_name;
16 expression np,E;
17 identifier l;
20 for_each_node_by_name(np,...) {
21   ... when != break;
22       when != goto l;
24 ... when != np = E
25 - of_node_put(np);
28 iterator name for_each_node_by_type;
29 expression np,E;
30 identifier l;
33 for_each_node_by_type(np,...) {
34   ... when != break;
35       when != goto l;
37 ... when != np = E
38 - of_node_put(np);
41 iterator name for_each_compatible_node;
42 expression np,E;
43 identifier l;
46 for_each_compatible_node(np,...) {
47   ... when != break;
48       when != goto l;
50 ... when != np = E
51 - of_node_put(np);
54 iterator name for_each_matching_node;
55 expression np,E;
56 identifier l;
59 for_each_matching_node(np,...) {
60   ... when != break;
61       when != goto l;
63 ... when != np = E
64 - of_node_put(np);