[RFC] OF: make of_property_for_each_u32() use parameters if OF is not enabled
Sebastian Andrzej Siewior
bigeasy at linutronix.de
Fri Jun 14 01:28:51 EST 2013
I am getting a few
|warning: unused variable ‘p’ [-Wunused-variable]
|warning: unused variable ‘prop’ [-Wunused-variable]
in the case where CONFIG_OF is not defined and the parameters are only
used in the loop macro.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
---
include/linux/of.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 1fd08ca..5a89f3f 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -507,8 +507,8 @@ static inline int of_machine_is_compatible(const char *compat)
#define of_match_ptr(_ptr) NULL
#define of_match_node(_matches, _node) NULL
-#define of_property_for_each_u32(np, propname, prop, p, u) \
- while (0)
+#define of_property_for_each_u32(np, propname, prop, p, u) \
+ for (prop = NULL, p = NULL; 0; prop++, p++)
#define of_property_for_each_string(np, propname, prop, s) \
while (0)
#endif /* CONFIG_OF */
--
1.7.10.4
More information about the devicetree-discuss
mailing list