of: document refcount incrementation of of_get_cpu_node()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 20 Apr 2016 01:18:46 +0000 (10:18 +0900)
committerRob Herring <robh@kernel.org>
Mon, 25 Apr 2016 15:06:39 +0000 (10:06 -0500)
This function increments refcount.  This is worth noting.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/base.c

index e87e21df19d8fcf177750fa1d9266240917ecd2b..116666b088cc15da320fa07f901b2e397a604eea 100644 (file)
@@ -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)
 {