devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: add stub for for_each_property_of_node()
@ 2015-07-01  8:10 Tomeu Vizoso
       [not found] ` <1435738208-3740-1-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Tomeu Vizoso @ 2015-07-01  8:10 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Tomeu Vizoso, Grant Likely, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA

So code that isn't protected by CONFIG_OF can still build.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---
 include/linux/of.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index edc068d..8922448 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -673,6 +673,9 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
 
 #define of_match_ptr(_ptr)	NULL
 #define of_match_node(_matches, _node)	NULL
+#define for_each_property_of_node(dn, pp)	\
+	for (; NULL; )
+
 #endif /* CONFIG_OF */
 
 #if defined(CONFIG_OF) && defined(CONFIG_NUMA)
-- 
2.4.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] of: add stub for for_each_property_of_node()
       [not found] ` <1435738208-3740-1-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
@ 2015-07-01 17:39   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2015-07-01 17:39 UTC (permalink / raw)
  To: Tomeu Vizoso
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Grant Likely, Rob Herring,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Wed, Jul 1, 2015 at 3:10 AM, Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> wrote:
> So code that isn't protected by CONFIG_OF can still build.

Is something in mainline/next broken? If not do you have a user?

>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
> ---
>  include/linux/of.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index edc068d..8922448 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -673,6 +673,9 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
>
>  #define of_match_ptr(_ptr)     NULL
>  #define of_match_node(_matches, _node) NULL
> +#define for_each_property_of_node(dn, pp)      \
> +       for (; NULL; )
> +

We normally add empty functions that the iterator calls rather than an
empty for loop.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2015-07-01 17:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01  8:10 [PATCH] of: add stub for for_each_property_of_node() Tomeu Vizoso
     [not found] ` <1435738208-3740-1-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2015-07-01 17:39   ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).