* [PATCH] of: document refcount incrementation of of_get_cpu_node()
@ 2016-04-20 1:18 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2016-04-20 1:18 UTC (permalink / raw)
To: devicetree
Cc: Will Deacon, Catalin Marinas, Masahiro Yamada, Frank Rowand,
Rob Herring, linux-kernel, Grant Likely
This function increments refcount. This is worth noting.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
drivers/of/base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index b299de2..365e1c02 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -394,7 +394,8 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
* before booting secondary cores. This function uses arch_match_cpu_phys_id
* which can be overridden by architecture specific implementation.
*
- * Returns a node pointer for the logical cpu if found, else NULL.
+ * Returns a node pointer for the logical cpu with refcount incremented, use
+ * of_node_put() on it when done. Returns NULL if not found.
*/
struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
{
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] of: document refcount incrementation of of_get_cpu_node()
@ 2016-04-20 1:18 ` Masahiro Yamada
0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2016-04-20 1:18 UTC (permalink / raw)
To: devicetree-u79uwXL29TY76Z2rM5mHXA
Cc: Will Deacon, Catalin Marinas, Masahiro Yamada, Frank Rowand,
Rob Herring, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Grant Likely
This function increments refcount. This is worth noting.
Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
---
drivers/of/base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index b299de2..365e1c02 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -394,7 +394,8 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
* before booting secondary cores. This function uses arch_match_cpu_phys_id
* which can be overridden by architecture specific implementation.
*
- * Returns a node pointer for the logical cpu if found, else NULL.
+ * Returns a node pointer for the logical cpu with refcount incremented, use
+ * of_node_put() on it when done. Returns NULL if not found.
*/
struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
{
--
1.9.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] 5+ messages in thread
* Re: [PATCH] of: document refcount incrementation of of_get_cpu_node()
2016-04-20 1:18 ` Masahiro Yamada
(?)
@ 2016-04-21 23:02 ` Frank Rowand
-1 siblings, 0 replies; 5+ messages in thread
From: Frank Rowand @ 2016-04-21 23:02 UTC (permalink / raw)
To: Masahiro Yamada
Cc: devicetree, Will Deacon, Catalin Marinas, Rob Herring,
linux-kernel, Grant Likely
On 4/19/2016 6:18 PM, Masahiro Yamada wrote:
> This function increments refcount. This is worth noting.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
> drivers/of/base.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index b299de2..365e1c02 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -394,7 +394,8 @@ bool __weak arch_find_n_match_cpu_physical_id(struct device_node *cpun,
> * before booting secondary cores. This function uses arch_match_cpu_phys_id
> * which can be overridden by architecture specific implementation.
> *
> - * Returns a node pointer for the logical cpu if found, else NULL.
> + * Returns a node pointer for the logical cpu with refcount incremented, use
> + * of_node_put() on it when done. Returns NULL if not found.
> */
> struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
> {
>
Nice catch.
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of: document refcount incrementation of of_get_cpu_node()
@ 2016-04-25 15:10 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2016-04-25 15:10 UTC (permalink / raw)
To: Masahiro Yamada
Cc: devicetree, Will Deacon, Catalin Marinas, Frank Rowand,
linux-kernel, Grant Likely
On Tue, Apr 19, 2016 at 8:18 PM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> This function increments refcount. This is worth noting.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied, thanks.
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of: document refcount incrementation of of_get_cpu_node()
@ 2016-04-25 15:10 ` Rob Herring
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring @ 2016-04-25 15:10 UTC (permalink / raw)
To: Masahiro Yamada
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Will Deacon, Catalin Marinas,
Frank Rowand, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Grant Likely
On Tue, Apr 19, 2016 at 8:18 PM, Masahiro Yamada
<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org> wrote:
> This function increments refcount. This is worth noting.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
Applied, thanks.
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] 5+ messages in thread
end of thread, other threads:[~2016-04-25 15:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20 1:18 [PATCH] of: document refcount incrementation of of_get_cpu_node() Masahiro Yamada
2016-04-20 1:18 ` Masahiro Yamada
2016-04-21 23:02 ` Frank Rowand
2016-04-25 15:10 ` Rob Herring
2016-04-25 15:10 ` 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.