From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932263AbcDTBS4 (ORCPT ); Tue, 19 Apr 2016 21:18:56 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:37370 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932150AbcDTBSz (ORCPT ); Tue, 19 Apr 2016 21:18:55 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u3K1HtaJ029665 X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: devicetree@vger.kernel.org Cc: Will Deacon , Catalin Marinas , Masahiro Yamada , Frank Rowand , Rob Herring , linux-kernel@vger.kernel.org, Grant Likely Subject: [PATCH] of: document refcount incrementation of of_get_cpu_node() Date: Wed, 20 Apr 2016 10:18:46 +0900 Message-Id: <1461115126-2648-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function increments refcount. This is worth noting. Signed-off-by: Masahiro Yamada --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Subject: [PATCH] of: document refcount incrementation of of_get_cpu_node() Date: Wed, 20 Apr 2016 10:18:46 +0900 Message-ID: <1461115126-2648-1-git-send-email-yamada.masahiro@socionext.com> Return-path: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: Will Deacon , Catalin Marinas , Masahiro Yamada , Frank Rowand , Rob Herring , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Grant Likely List-Id: devicetree@vger.kernel.org This function increments refcount. This is worth noting. Signed-off-by: Masahiro Yamada --- 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