From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753517AbcDUXCr (ORCPT ); Thu, 21 Apr 2016 19:02:47 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34756 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829AbcDUXCn (ORCPT ); Thu, 21 Apr 2016 19:02:43 -0400 Message-ID: <57195C11.8080609@gmail.com> Date: Thu, 21 Apr 2016 16:02:41 -0700 From: Frank Rowand Reply-To: frowand.list@gmail.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Masahiro Yamada CC: devicetree@vger.kernel.org, Will Deacon , Catalin Marinas , Rob Herring , linux-kernel@vger.kernel.org, Grant Likely Subject: Re: [PATCH] of: document refcount incrementation of of_get_cpu_node() References: <1461115126-2648-1-git-send-email-yamada.masahiro@socionext.com> In-Reply-To: <1461115126-2648-1-git-send-email-yamada.masahiro@socionext.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/19/2016 6:18 PM, Masahiro Yamada wrote: > 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) > { > Nice catch. Reviewed-by: Frank Rowand