All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of: base: Export symbol of __of_find_all_nodes()
@ 2016-10-28 11:28 Laxman Dewangan
       [not found] ` <1477654092-12406-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Laxman Dewangan @ 2016-10-28 11:28 UTC (permalink / raw)
  To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, frowand.list-Re5JQEeQqe8AvxtiuMwx3w
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Laxman Dewangan

The function __of_find_all_nodes() is used in the public header
linux/of.h and if any driver developed using this API then
it reports error as unknown symbol if compiled as module.

Export this APIs using EXPORT_SYMBOL() so that it can be used
from driver compiled as module.

Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/of/base.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index d687e6d..89c2083 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -269,6 +269,7 @@ struct device_node *__of_find_all_nodes(struct device_node *prev)
 	}
 	return np;
 }
+EXPORT_SYMBOL(__of_find_all_nodes);
 
 /**
  * of_find_all_nodes - Get next node in global list
-- 
2.1.4


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
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] 6+ messages in thread

* Re: [PATCH] of: base: Export symbol of __of_find_all_nodes()
       [not found] ` <1477654092-12406-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-11-03  3:39   ` Rob Herring
       [not found]     ` <CAL_JsqJnAzJDeTS1Sr2H66++78zF+8wJfN8iYAQ3sbxJw1Axdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2016-11-03  3:39 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA

On Fri, Oct 28, 2016 at 6:28 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> The function __of_find_all_nodes() is used in the public header
> linux/of.h and if any driver developed using this API then
> it reports error as unknown symbol if compiled as module.
>
> Export this APIs using EXPORT_SYMBOL() so that it can be used
> from driver compiled as module.

What driver needs this? This isn't really a function I'd expect drivers to use.

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

* Re: [PATCH] of: base: Export symbol of __of_find_all_nodes()
       [not found]     ` <CAL_JsqJnAzJDeTS1Sr2H66++78zF+8wJfN8iYAQ3sbxJw1Axdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-11-03  5:24       ` Laxman Dewangan
       [not found]         ` <581ACA0B.3010107-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Laxman Dewangan @ 2016-11-03  5:24 UTC (permalink / raw)
  To: Rob Herring; +Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA


On Thursday 03 November 2016 09:09 AM, Rob Herring wrote:
> On Fri, Oct 28, 2016 at 6:28 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>> The function __of_find_all_nodes() is used in the public header
>> linux/of.h and if any driver developed using this API then
>> it reports error as unknown symbol if compiled as module.
>>
>> Export this APIs using EXPORT_SYMBOL() so that it can be used
>> from driver compiled as module.
> What driver needs this? This isn't really a function I'd expect drivers to use.
>

I am using the for loop for each node using the macro 
for_each_of_allnodes_from() which is define as

#define for_each_of_allnodes_from(from, dn) \
         for (dn = __of_find_all_nodes(from); dn; dn = 
__of_find_all_nodes(dn))

and this is using the above APIs.


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
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] 6+ messages in thread

* Re: [PATCH] of: base: Export symbol of __of_find_all_nodes()
       [not found]         ` <581ACA0B.3010107-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-11-03 14:16           ` Rob Herring
       [not found]             ` <CAL_JsqLMfKNUxgYLSePAD7msW+nVdze3LgNrUMXMY1BfYkzs0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2016-11-03 14:16 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA

On Thu, Nov 3, 2016 at 12:24 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>
> On Thursday 03 November 2016 09:09 AM, Rob Herring wrote:
>>
>> On Fri, Oct 28, 2016 at 6:28 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> wrote:
>>>
>>> The function __of_find_all_nodes() is used in the public header
>>> linux/of.h and if any driver developed using this API then
>>> it reports error as unknown symbol if compiled as module.
>>>
>>> Export this APIs using EXPORT_SYMBOL() so that it can be used
>>> from driver compiled as module.
>>
>> What driver needs this? This isn't really a function I'd expect drivers to
>> use.
>>
>
> I am using the for loop for each node using the macro
> for_each_of_allnodes_from() which is define as
>
> #define for_each_of_allnodes_from(from, dn) \
>         for (dn = __of_find_all_nodes(from); dn; dn =
> __of_find_all_nodes(dn))
>
> and this is using the above APIs.

And then what driver is using this define?

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

* Re: [PATCH] of: base: Export symbol of __of_find_all_nodes()
       [not found]             ` <CAL_JsqLMfKNUxgYLSePAD7msW+nVdze3LgNrUMXMY1BfYkzs0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-11-04  5:32               ` Laxman Dewangan
       [not found]                 ` <581C1D7E.6030608-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Laxman Dewangan @ 2016-11-04  5:32 UTC (permalink / raw)
  To: Rob Herring; +Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA


On Thursday 03 November 2016 07:46 PM, Rob Herring wrote:
> On Thu, Nov 3, 2016 at 12:24 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>> On Thursday 03 November 2016 09:09 AM, Rob Herring wrote:
>>> On Fri, Oct 28, 2016 at 6:28 AM, Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> wrote:
>>>> The function __of_find_all_nodes() is used in the public header
>>>> linux/of.h and if any driver developed using this API then
>>>> it reports error as unknown symbol if compiled as module.
>>>>
>>>> Export this APIs using EXPORT_SYMBOL() so that it can be used
>>>> from driver compiled as module.
>>> What driver needs this? This isn't really a function I'd expect drivers to
>>> use.
>>>
>> I am using the for loop for each node using the macro
>> for_each_of_allnodes_from() which is define as
>>
>> #define for_each_of_allnodes_from(from, dn) \
>>          for (dn = __of_find_all_nodes(from); dn; dn =
>> __of_find_all_nodes(dn))
>>
>> and this is using the above APIs.
> And then what driver is using this define?
We are developing the utils/testcase on OF interface echo system. In one 
of the testcase, we want to limit the node and property name length to 
32 (max) as per ePAPR specs. This is needed to reuse the DT in multi-OS 
environment and so want to maintain ePAPR compliance here.

We are using the above macro for iterating over each node.



-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
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] 6+ messages in thread

* Re: [PATCH] of: base: Export symbol of __of_find_all_nodes()
       [not found]                 ` <581C1D7E.6030608-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-11-30 15:47                   ` Laxman Dewangan
  0 siblings, 0 replies; 6+ messages in thread
From: Laxman Dewangan @ 2016-11-30 15:47 UTC (permalink / raw)
  To: Rob Herring; +Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA


On Friday 04 November 2016 11:02 AM, Laxman Dewangan wrote:
>
> On Thursday 03 November 2016 07:46 PM, Rob Herring wrote:
>> On Thu, Nov 3, 2016 at 12:24 AM, Laxman Dewangan 
>> <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>> On Thursday 03 November 2016 09:09 AM, Rob Herring wrote:
>>>> On Fri, Oct 28, 2016 at 6:28 AM, Laxman Dewangan 
>>>> <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>>> wrote:
>>>>> The function __of_find_all_nodes() is used in the public header
>>>>> linux/of.h and if any driver developed using this API then
>>>>> it reports error as unknown symbol if compiled as module.
>>>>>
>>>>> Export this APIs using EXPORT_SYMBOL() so that it can be used
>>>>> from driver compiled as module.
>>>> What driver needs this? This isn't really a function I'd expect 
>>>> drivers to
>>>> use.
>>>>
>>> I am using the for loop for each node using the macro
>>> for_each_of_allnodes_from() which is define as
>>>
>>> #define for_each_of_allnodes_from(from, dn) \
>>>          for (dn = __of_find_all_nodes(from); dn; dn =
>>> __of_find_all_nodes(dn))
>>>
>>> and this is using the above APIs.
>> And then what driver is using this define?
> We are developing the utils/testcase on OF interface echo system. In 
> one of the testcase, we want to limit the node and property name 
> length to 32 (max) as per ePAPR specs. This is needed to reuse the DT 
> in multi-OS environment and so want to maintain ePAPR compliance here.
>
> We are using the above macro for iterating over each node.
>
>
Hi Rob,
Any comment or suggestion?

Thanks,
Laxman



-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
--
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] 6+ messages in thread

end of thread, other threads:[~2016-11-30 15:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 11:28 [PATCH] of: base: Export symbol of __of_find_all_nodes() Laxman Dewangan
     [not found] ` <1477654092-12406-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-03  3:39   ` Rob Herring
     [not found]     ` <CAL_JsqJnAzJDeTS1Sr2H66++78zF+8wJfN8iYAQ3sbxJw1Axdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-03  5:24       ` Laxman Dewangan
     [not found]         ` <581ACA0B.3010107-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-03 14:16           ` Rob Herring
     [not found]             ` <CAL_JsqLMfKNUxgYLSePAD7msW+nVdze3LgNrUMXMY1BfYkzs0A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-04  5:32               ` Laxman Dewangan
     [not found]                 ` <581C1D7E.6030608-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-11-30 15:47                   ` Laxman Dewangan

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.