Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1382951 > unrolled thread
| Started by | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| First post | 2016-04-20 03:20 +0200 |
| Last post | 2016-04-25 17:20 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] of: document refcount incrementation of of_get_cpu_node() Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-04-20 03:20 +0200
Re: [PATCH] of: document refcount incrementation of of_get_cpu_node() Frank Rowand <frowand.list@gmail.com> - 2016-04-22 01:10 +0200
Re: [PATCH] of: document refcount incrementation of of_get_cpu_node() Rob Herring <robh+dt@kernel.org> - 2016-04-25 17:20 +0200
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Date | 2016-04-20 03:20 +0200 |
| Subject | [PATCH] of: document refcount incrementation of of_get_cpu_node() |
| Message-ID | <rpOYa-81w-11@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Frank Rowand <frowand.list@gmail.com> |
|---|---|
| Date | 2016-04-22 01:10 +0200 |
| Message-ID | <rqvTs-qs-9@gated-at.bofh.it> |
| In reply to | #1382951 |
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>
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh+dt@kernel.org> |
|---|---|
| Date | 2016-04-25 17:20 +0200 |
| Message-ID | <rrQsN-856-5@gated-at.bofh.it> |
| In reply to | #1382951 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web