LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
@ 2019-05-07  4:48 Douglas Anderson
  2019-05-07 14:52 ` Guenter Roeck
  2019-05-07 17:52 ` Frank Rowand
  0 siblings, 2 replies; 7+ messages in thread
From: Douglas Anderson @ 2019-05-07  4:48 UTC (permalink / raw)
  To: Rob Herring, Kees Cook
  Cc: linux-rockchip, jwerner, groeck, briannorris, Douglas Anderson,
	Frank Rowand, devicetree, linux-kernel

We'll add a dummy to just return false.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---

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

diff --git a/include/linux/of.h b/include/linux/of.h
index 0cf857012f11..62ae5c1cafa5 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -653,6 +653,11 @@ static inline bool of_have_populated_dt(void)
 	return false;
 }
 
+static inline bool of_node_is_root(const struct device_node *node)
+{
+	return false;
+}
+
 static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
 					const char *compatible)
 {
-- 
2.21.0.1020.gf2820cf01a-goog


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

* Re: [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
  2019-05-07  4:48 [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF Douglas Anderson
@ 2019-05-07 14:52 ` Guenter Roeck
  2019-05-07 17:52 ` Frank Rowand
  1 sibling, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2019-05-07 14:52 UTC (permalink / raw)
  To: Douglas Anderson
  Cc: Rob Herring, Kees Cook, open list:ARM/Rockchip SoC...,
	Julius Werner, Guenter Roeck, Brian Norris, Frank Rowand,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE, linux-kernel

On Mon, May 6, 2019 at 9:48 PM Douglas Anderson <dianders@chromium.org> wrote:
>
> We'll add a dummy to just return false.
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>

Reviewed-by: Guenter Roeck <groeck@chromium.org>

> ---
>
>  include/linux/of.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 0cf857012f11..62ae5c1cafa5 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -653,6 +653,11 @@ static inline bool of_have_populated_dt(void)
>         return false;
>  }
>
> +static inline bool of_node_is_root(const struct device_node *node)
> +{
> +       return false;
> +}
> +
>  static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
>                                         const char *compatible)
>  {
> --
> 2.21.0.1020.gf2820cf01a-goog
>

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

* Re: [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
  2019-05-07  4:48 [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF Douglas Anderson
  2019-05-07 14:52 ` Guenter Roeck
@ 2019-05-07 17:52 ` Frank Rowand
  2019-05-07 17:59   ` Doug Anderson
  1 sibling, 1 reply; 7+ messages in thread
From: Frank Rowand @ 2019-05-07 17:52 UTC (permalink / raw)
  To: Douglas Anderson, Rob Herring, Kees Cook
  Cc: linux-rockchip, jwerner, groeck, briannorris, devicetree, linux-kernel

On 5/6/19 9:48 PM, Douglas Anderson wrote:
> We'll add a dummy to just return false.

A more complete explanation of why this is needed please.

My one guess would be compile testing of arch/sparc/kernel/prom_64.c
fails???

-Frank


> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
>  include/linux/of.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/include/linux/of.h b/include/linux/of.h
> index 0cf857012f11..62ae5c1cafa5 100644
> --- a/include/linux/of.h
> +++ b/include/linux/of.h
> @@ -653,6 +653,11 @@ static inline bool of_have_populated_dt(void)
>  	return false;
>  }
>  
> +static inline bool of_node_is_root(const struct device_node *node)
> +{
> +	return false;
> +}
> +
>  static inline struct device_node *of_get_compatible_child(const struct device_node *parent,
>  					const char *compatible)
>  {
> 


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

* Re: [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
  2019-05-07 17:52 ` Frank Rowand
@ 2019-05-07 17:59   ` Doug Anderson
  2019-05-07 21:15     ` Kees Cook
  2019-05-07 22:17     ` Frank Rowand
  0 siblings, 2 replies; 7+ messages in thread
From: Doug Anderson @ 2019-05-07 17:59 UTC (permalink / raw)
  To: Frank Rowand
  Cc: Rob Herring, Kees Cook, open list:ARM/Rockchip SoC...,
	Julius Werner, Guenter Roeck, Brian Norris, devicetree, LKML

Hi,


On Tue, May 7, 2019 at 10:52 AM Frank Rowand <frowand.list@gmail.com> wrote:
>
> On 5/6/19 9:48 PM, Douglas Anderson wrote:
> > We'll add a dummy to just return false.
>
> A more complete explanation of why this is needed please.
>
> My one guess would be compile testing of arch/sparc/kernel/prom_64.c
> fails???

Ah, sorry.  Needed for:

https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com



-Doug

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

* Re: [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
  2019-05-07 17:59   ` Doug Anderson
@ 2019-05-07 21:15     ` Kees Cook
  2019-05-07 22:17     ` Frank Rowand
  1 sibling, 0 replies; 7+ messages in thread
From: Kees Cook @ 2019-05-07 21:15 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Frank Rowand, Rob Herring, open list:ARM/Rockchip SoC...,
	Julius Werner, Guenter Roeck, Brian Norris, devicetree, LKML

On Tue, May 7, 2019 at 10:59 AM Doug Anderson <dianders@chromium.org> wrote:
> On Tue, May 7, 2019 at 10:52 AM Frank Rowand <frowand.list@gmail.com> wrote:
> >
> > On 5/6/19 9:48 PM, Douglas Anderson wrote:
> > > We'll add a dummy to just return false.
> >
> > A more complete explanation of why this is needed please.
> >
> > My one guess would be compile testing of arch/sparc/kernel/prom_64.c
> > fails???
>
> Ah, sorry.  Needed for:
>
> https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com

Should I take both patches via pstore, or should both go via DT tree?

-- 
Kees Cook

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

* Re: [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
  2019-05-07 17:59   ` Doug Anderson
  2019-05-07 21:15     ` Kees Cook
@ 2019-05-07 22:17     ` Frank Rowand
  2019-05-08 15:51       ` Doug Anderson
  1 sibling, 1 reply; 7+ messages in thread
From: Frank Rowand @ 2019-05-07 22:17 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Rob Herring, Kees Cook, open list:ARM/Rockchip SoC...,
	Julius Werner, Guenter Roeck, Brian Norris, devicetree, LKML

On 5/7/19 10:59 AM, Doug Anderson wrote:
> Hi,
> 
> 
> On Tue, May 7, 2019 at 10:52 AM Frank Rowand <frowand.list@gmail.com> wrote:
>>
>> On 5/6/19 9:48 PM, Douglas Anderson wrote:
>>> We'll add a dummy to just return false.
>>
>> A more complete explanation of why this is needed please.
>>
>> My one guess would be compile testing of arch/sparc/kernel/prom_64.c
>> fails???
> 
> Ah, sorry.  Needed for:
> 
> https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com

Got it.  I went and looked at that.  I think a better approach would be to
check parent node not "/reserved-memory".  I am making this suggestion in
that email thread.

-Frank

> 
> 
> 
> -Doug
> .
> 


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

* Re: [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF
  2019-05-07 22:17     ` Frank Rowand
@ 2019-05-08 15:51       ` Doug Anderson
  0 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2019-05-08 15:51 UTC (permalink / raw)
  To: Frank Rowand
  Cc: Rob Herring, Kees Cook, open list:ARM/Rockchip SoC...,
	Julius Werner, Guenter Roeck, Brian Norris, devicetree, LKML

Hi,

On Tue, May 7, 2019 at 3:17 PM Frank Rowand <frowand.list@gmail.com> wrote:
>
> On 5/7/19 10:59 AM, Doug Anderson wrote:
> > Hi,
> >
> >
> > On Tue, May 7, 2019 at 10:52 AM Frank Rowand <frowand.list@gmail.com> wrote:
> >>
> >> On 5/6/19 9:48 PM, Douglas Anderson wrote:
> >>> We'll add a dummy to just return false.
> >>
> >> A more complete explanation of why this is needed please.
> >>
> >> My one guess would be compile testing of arch/sparc/kernel/prom_64.c
> >> fails???
> >
> > Ah, sorry.  Needed for:
> >
> > https://lkml.kernel.org/r/CAD=FV=Vxp-U7mZUNmAAOja5pt-8rZqPryEvwTg_Dv3ChuH_TrA@mail.gmail.com
>
> Got it.  I went and looked at that.  I think a better approach would be to
> check parent node not "/reserved-memory".  I am making this suggestion in
> that email thread.

OK.  Assuming that people are happy with that approach [1], we should
consider this patch abandoned.  Thanks for your reviews!

[1] https://lkml.kernel.org/r/20190508154832.241525-1-dianders@chromium.org

-Doug

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

end of thread, other threads:[~2019-05-08 15:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07  4:48 [PATCH] of: Add dummy for of_node_is_root if not CONFIG_OF Douglas Anderson
2019-05-07 14:52 ` Guenter Roeck
2019-05-07 17:52 ` Frank Rowand
2019-05-07 17:59   ` Doug Anderson
2019-05-07 21:15     ` Kees Cook
2019-05-07 22:17     ` Frank Rowand
2019-05-08 15:51       ` Doug Anderson

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).