summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-18 11:47:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-18 11:47:53 -0700
commitbab58350e565756df9e45daafe8301a309b35e7e (patch)
tree16dd66427112b89b2158ad3ca50a29043fb72fdf /scripts
parentec351832bc83daf5985c4c3cbb72d743a2408a73 (diff)
parent205a8eb7ce713c7f1722297dd97d19dcea6f266c (diff)
downloadop-kernel-dev-bab58350e565756df9e45daafe8301a309b35e7e.zip
op-kernel-dev-bab58350e565756df9e45daafe8301a309b35e7e.tar.gz
Merge tag 'dt-fixes-for-3.7' of git://sources.calxeda.com/kernel/linux
Pull DeviceTree fixes from Rob Herring: "A handful of fixes: - a fix for dtc from upstream - sparse fixes in DeviceTree code - stub of_get_child_by_name for !OF builds" * tag 'dt-fixes-for-3.7' of git://sources.calxeda.com/kernel/linux: dtc: fix for_each_*() to skip first object if deleted of/platform: sparse fix of/irq: sparse fixes of/address: sparse fixes of: add stub of_get_child_by_name for non-OF builds
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dtc/dtc.h44
1 files changed, 10 insertions, 34 deletions
diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h
index d501c86..3e42a07 100644
--- a/scripts/dtc/dtc.h
+++ b/scripts/dtc/dtc.h
@@ -161,51 +161,27 @@ struct node {
struct label *labels;
};
-static inline struct label *for_each_label_next(struct label *l)
-{
- do {
- l = l->next;
- } while (l && l->deleted);
-
- return l;
-}
-
-#define for_each_label(l0, l) \
- for ((l) = (l0); (l); (l) = for_each_label_next(l))
-
#define for_each_label_withdel(l0, l) \
for ((l) = (l0); (l); (l) = (l)->next)
-static inline struct property *for_each_property_next(struct property *p)
-{
- do {
- p = p->next;
- } while (p && p->deleted);
-
- return p;
-}
-
-#define for_each_property(n, p) \
- for ((p) = (n)->proplist; (p); (p) = for_each_property_next(p))
+#define for_each_label(l0, l) \
+ for_each_label_withdel(l0, l) \
+ if (!(l)->deleted)
#define for_each_property_withdel(n, p) \
for ((p) = (n)->proplist; (p); (p) = (p)->next)
-static inline struct node *for_each_child_next(struct node *c)
-{
- do {
- c = c->next_sibling;
- } while (c && c->deleted);
-
- return c;
-}
-
-#define for_each_child(n, c) \
- for ((c) = (n)->children; (c); (c) = for_each_child_next(c))
+#define for_each_property(n, p) \
+ for_each_property_withdel(n, p) \
+ if (!(p)->deleted)
#define for_each_child_withdel(n, c) \
for ((c) = (n)->children; (c); (c) = (c)->next_sibling)
+#define for_each_child(n, c) \
+ for_each_child_withdel(n, c) \
+ if (!(c)->deleted)
+
void add_label(struct label **labels, char *label);
void delete_labels(struct label **labels);
OpenPOWER on IntegriCloud