All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:00 ` Eugeniy Paltsev
  0 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2017-08-25 15:00 UTC (permalink / raw)
  To: linux-snps-arc

Move extern declarations of "of_root", "of_chosen", "of_aliases",
"of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
of "CONFIG_OF" ifdef in their usage places.

Suggested-by: Steven Rostedt <rostedt at goodmis.org>

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
---
For example see: https://lkml.org/lkml/2017/8/25/337

 include/linux/of.h | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index cfc3411..d117bf1 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -131,11 +131,6 @@ static inline struct device_node *of_node_get(struct device_node *node)
 static inline void of_node_put(struct device_node *node) { }
 #endif /* !CONFIG_OF_DYNAMIC */
 
-/* Pointer for first entry in chain of all nodes. */
-extern struct device_node *of_root;
-extern struct device_node *of_chosen;
-extern struct device_node *of_aliases;
-extern struct device_node *of_stdout;
 extern raw_spinlock_t devtree_lock;
 
 /* flag descriptions (need to be visible even when !CONFIG_OF) */
@@ -147,6 +142,12 @@ extern raw_spinlock_t devtree_lock;
 #define OF_BAD_ADDR	((u64)-1)
 
 #ifdef CONFIG_OF
+/* Pointer for first entry in chain of all nodes. */
+extern struct device_node *of_root;
+extern struct device_node *of_chosen;
+extern struct device_node *of_aliases;
+extern struct device_node *of_stdout;
+
 void of_core_init(void);
 
 static inline bool is_of_node(const struct fwnode_handle *fwnode)
@@ -539,6 +540,10 @@ const char *of_prop_next_string(struct property *prop, const char *cur);
 bool of_console_check(struct device_node *dn, char *name, int index);
 
 #else /* CONFIG_OF */
+#define of_root		NULL
+#define of_chosen	NULL
+#define of_aliases	NULL
+#define of_stdout	NULL
 
 static inline void of_core_init(void)
 {
-- 
2.9.3

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

* [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:00 ` Eugeniy Paltsev
  0 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2017-08-25 15:00 UTC (permalink / raw)
  To: devicetree
  Cc: linux-snps-arc, linux-kernel, Rob Herring, Frank Rowand,
	Steven Rostedt, Eugeniy Paltsev

Move extern declarations of "of_root", "of_chosen", "of_aliases",
"of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
of "CONFIG_OF" ifdef in their usage places.

Suggested-by: Steven Rostedt <rostedt@goodmis.org>

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
For example see: https://lkml.org/lkml/2017/8/25/337

 include/linux/of.h | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/linux/of.h b/include/linux/of.h
index cfc3411..d117bf1 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -131,11 +131,6 @@ static inline struct device_node *of_node_get(struct device_node *node)
 static inline void of_node_put(struct device_node *node) { }
 #endif /* !CONFIG_OF_DYNAMIC */
 
-/* Pointer for first entry in chain of all nodes. */
-extern struct device_node *of_root;
-extern struct device_node *of_chosen;
-extern struct device_node *of_aliases;
-extern struct device_node *of_stdout;
 extern raw_spinlock_t devtree_lock;
 
 /* flag descriptions (need to be visible even when !CONFIG_OF) */
@@ -147,6 +142,12 @@ extern raw_spinlock_t devtree_lock;
 #define OF_BAD_ADDR	((u64)-1)
 
 #ifdef CONFIG_OF
+/* Pointer for first entry in chain of all nodes. */
+extern struct device_node *of_root;
+extern struct device_node *of_chosen;
+extern struct device_node *of_aliases;
+extern struct device_node *of_stdout;
+
 void of_core_init(void);
 
 static inline bool is_of_node(const struct fwnode_handle *fwnode)
@@ -539,6 +540,10 @@ const char *of_prop_next_string(struct property *prop, const char *cur);
 bool of_console_check(struct device_node *dn, char *name, int index);
 
 #else /* CONFIG_OF */
+#define of_root		NULL
+#define of_chosen	NULL
+#define of_aliases	NULL
+#define of_stdout	NULL
 
 static inline void of_core_init(void)
 {
-- 
2.9.3

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

* [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:12   ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2017-08-25 15:12 UTC (permalink / raw)
  To: linux-snps-arc

On Fri, 25 Aug 2017 18:00:26 +0300
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:

> Move extern declarations of "of_root", "of_chosen", "of_aliases",
> "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> of "CONFIG_OF" ifdef in their usage places.
> 
> Suggested-by: Steven Rostedt <rostedt at goodmis.org>

Thanks!

-- Steve

> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
> ---

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

* Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:12   ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2017-08-25 15:12 UTC (permalink / raw)
  To: Eugeniy Paltsev
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Frank Rowand

On Fri, 25 Aug 2017 18:00:26 +0300
Eugeniy Paltsev <Eugeniy.Paltsev-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> wrote:

> Move extern declarations of "of_root", "of_chosen", "of_aliases",
> "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> of "CONFIG_OF" ifdef in their usage places.
> 
> Suggested-by: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>

Thanks!

-- Steve

> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
> ---
--
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] 12+ messages in thread

* Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:12   ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2017-08-25 15:12 UTC (permalink / raw)
  To: Eugeniy Paltsev
  Cc: devicetree, linux-snps-arc, linux-kernel, Rob Herring,
	Frank Rowand

On Fri, 25 Aug 2017 18:00:26 +0300
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:

> Move extern declarations of "of_root", "of_chosen", "of_aliases",
> "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> of "CONFIG_OF" ifdef in their usage places.
> 
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>

Thanks!

-- Steve

> 
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> ---

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

* [PATCH] OF: move extern declarations of entry pointers inside ifdef
  2017-08-25 15:12   ` Steven Rostedt
@ 2017-08-25 15:20     ` Eugeniy Paltsev
  -1 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2017-08-25 15:20 UTC (permalink / raw)
  To: linux-snps-arc

On Fri, 2017-08-25@11:12 -0400, Steven Rostedt wrote:
> On Fri, 25 Aug 2017 18:00:26 +0300
> Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:
> 
> > Move extern declarations of "of_root", "of_chosen", "of_aliases",
> > "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> > of "CONFIG_OF" ifdef in their usage places.
> > 
> > Suggested-by: Steven Rostedt <rostedt at goodmis.org>
> 
> Thanks!
> -- Steve

Could you please ACK my patch if it looks good for you?
Thanks.

> > 
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
> > ---
-- 
?Eugeniy Paltsev

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

* Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:20     ` Eugeniy Paltsev
  0 siblings, 0 replies; 12+ messages in thread
From: Eugeniy Paltsev @ 2017-08-25 15:20 UTC (permalink / raw)
  To: rostedt@goodmis.org
  Cc: linux-kernel@vger.kernel.org, frowand.list@gmail.com,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-snps-arc@lists.infradead.org

On Fri, 2017-08-25 at 11:12 -0400, Steven Rostedt wrote:
> On Fri, 25 Aug 2017 18:00:26 +0300
> Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:
> 
> > Move extern declarations of "of_root", "of_chosen", "of_aliases",
> > "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> > of "CONFIG_OF" ifdef in their usage places.
> > 
> > Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> 
> Thanks!
> -- Steve

Could you please ACK my patch if it looks good for you?
Thanks.

> > 
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> > ---
-- 
 Eugeniy Paltsev

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

* [PATCH] OF: move extern declarations of entry pointers inside ifdef
  2017-08-25 15:20     ` Eugeniy Paltsev
@ 2017-08-25 15:25       ` Steven Rostedt
  -1 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2017-08-25 15:25 UTC (permalink / raw)
  To: linux-snps-arc

On Fri, 25 Aug 2017 15:20:12 +0000
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:

> On Fri, 2017-08-25@11:12 -0400, Steven Rostedt wrote:
> > On Fri, 25 Aug 2017 18:00:26 +0300
> > Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:
> >   
> > > Move extern declarations of "of_root", "of_chosen", "of_aliases",
> > > "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> > > of "CONFIG_OF" ifdef in their usage places.
> > > 
> > > Suggested-by: Steven Rostedt <rostedt at goodmis.org>  
> > 
> > Thanks!
> > -- Steve  
> 
> Could you please ACK my patch if it looks good for you?
> Thanks.

I could, but ACKs are usually for the maintainer of the code being
changed. I don't maintain include/linux/of.h

But for what it's worth...

Acked-by: Steven Rostedt (VMware) <rostedt at goodmis.org>

-- Steve

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

* Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:25       ` Steven Rostedt
  0 siblings, 0 replies; 12+ messages in thread
From: Steven Rostedt @ 2017-08-25 15:25 UTC (permalink / raw)
  To: Eugeniy Paltsev
  Cc: linux-kernel@vger.kernel.org, frowand.list@gmail.com,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-snps-arc@lists.infradead.org

On Fri, 25 Aug 2017 15:20:12 +0000
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:

> On Fri, 2017-08-25 at 11:12 -0400, Steven Rostedt wrote:
> > On Fri, 25 Aug 2017 18:00:26 +0300
> > Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> wrote:
> >   
> > > Move extern declarations of "of_root", "of_chosen", "of_aliases",
> > > "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> > > of "CONFIG_OF" ifdef in their usage places.
> > > 
> > > Suggested-by: Steven Rostedt <rostedt@goodmis.org>  
> > 
> > Thanks!
> > -- Steve  
> 
> Could you please ACK my patch if it looks good for you?
> Thanks.

I could, but ACKs are usually for the maintainer of the code being
changed. I don't maintain include/linux/of.h

But for what it's worth...

Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

-- Steve

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

* [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:43   ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2017-08-25 15:43 UTC (permalink / raw)
  To: linux-snps-arc

On Fri, Aug 25, 2017 at 10:00 AM, Eugeniy Paltsev
<Eugeniy.Paltsev@synopsys.com> wrote:
> Move extern declarations of "of_root", "of_chosen", "of_aliases",
> "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> of "CONFIG_OF" ifdef in their usage places.
>
> Suggested-by: Steven Rostedt <rostedt at goodmis.org>
>
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev at synopsys.com>
> ---
> For example see: https://lkml.org/lkml/2017/8/25/337
>
>  include/linux/of.h | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index cfc3411..d117bf1 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -131,11 +131,6 @@ static inline struct device_node *of_node_get(struct device_node *node)
>  static inline void of_node_put(struct device_node *node) { }
>  #endif /* !CONFIG_OF_DYNAMIC */
>
> -/* Pointer for first entry in chain of all nodes. */
> -extern struct device_node *of_root;
> -extern struct device_node *of_chosen;
> -extern struct device_node *of_aliases;
> -extern struct device_node *of_stdout;

Just move what you need. Some of these I'd like to see be internal to
the DT code.

Rob

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

* Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:43   ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2017-08-25 15:43 UTC (permalink / raw)
  To: Eugeniy Paltsev
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-snps-arc-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	Linux Kernel Mailing List, Rob Herring, Frank Rowand,
	Steven Rostedt

On Fri, Aug 25, 2017 at 10:00 AM, Eugeniy Paltsev
<Eugeniy.Paltsev-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> wrote:
> Move extern declarations of "of_root", "of_chosen", "of_aliases",
> "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> of "CONFIG_OF" ifdef in their usage places.
>
> Suggested-by: Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>
>
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
> ---
> For example see: https://lkml.org/lkml/2017/8/25/337
>
>  include/linux/of.h | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index cfc3411..d117bf1 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -131,11 +131,6 @@ static inline struct device_node *of_node_get(struct device_node *node)
>  static inline void of_node_put(struct device_node *node) { }
>  #endif /* !CONFIG_OF_DYNAMIC */
>
> -/* Pointer for first entry in chain of all nodes. */
> -extern struct device_node *of_root;
> -extern struct device_node *of_chosen;
> -extern struct device_node *of_aliases;
> -extern struct device_node *of_stdout;

Just move what you need. Some of these I'd like to see be internal to
the DT code.

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] 12+ messages in thread

* Re: [PATCH] OF: move extern declarations of entry pointers inside ifdef
@ 2017-08-25 15:43   ` Rob Herring
  0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2017-08-25 15:43 UTC (permalink / raw)
  To: Eugeniy Paltsev
  Cc: devicetree@vger.kernel.org, linux-snps-arc,
	Linux Kernel Mailing List, Rob Herring, Frank Rowand,
	Steven Rostedt

On Fri, Aug 25, 2017 at 10:00 AM, Eugeniy Paltsev
<Eugeniy.Paltsev@synopsys.com> wrote:
> Move extern declarations of "of_root", "of_chosen", "of_aliases",
> "of_stdout" pointers inside "CONFIG_OF" ifdef to be able to get rid
> of "CONFIG_OF" ifdef in their usage places.
>
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
>
> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> ---
> For example see: https://lkml.org/lkml/2017/8/25/337
>
>  include/linux/of.h | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index cfc3411..d117bf1 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -131,11 +131,6 @@ static inline struct device_node *of_node_get(struct device_node *node)
>  static inline void of_node_put(struct device_node *node) { }
>  #endif /* !CONFIG_OF_DYNAMIC */
>
> -/* Pointer for first entry in chain of all nodes. */
> -extern struct device_node *of_root;
> -extern struct device_node *of_chosen;
> -extern struct device_node *of_aliases;
> -extern struct device_node *of_stdout;

Just move what you need. Some of these I'd like to see be internal to
the DT code.

Rob

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

end of thread, other threads:[~2017-08-25 15:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-25 15:00 [PATCH] OF: move extern declarations of entry pointers inside ifdef Eugeniy Paltsev
2017-08-25 15:00 ` Eugeniy Paltsev
2017-08-25 15:12 ` Steven Rostedt
2017-08-25 15:12   ` Steven Rostedt
2017-08-25 15:12   ` Steven Rostedt
2017-08-25 15:20   ` Eugeniy Paltsev
2017-08-25 15:20     ` Eugeniy Paltsev
2017-08-25 15:25     ` Steven Rostedt
2017-08-25 15:25       ` Steven Rostedt
2017-08-25 15:43 ` Rob Herring
2017-08-25 15:43   ` Rob Herring
2017-08-25 15:43   ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.