From patchwork Wed Apr 20 01:18:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 66144 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2176754qge; Tue, 19 Apr 2016 18:18:57 -0700 (PDT) X-Received: by 10.98.33.79 with SMTP id h76mr8453942pfh.119.1461115137251; Tue, 19 Apr 2016 18:18:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si16736501pax.154.2016.04.19.18.18.57; Tue, 19 Apr 2016 18:18:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932188AbcDTBSz (ORCPT + 7 others); Tue, 19 Apr 2016 21:18:55 -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 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u3K1HtaJ029665; Wed, 20 Apr 2016 10:17:55 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u3K1HtaJ029665 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1461115076; bh=eEbMgyJQdcsSam+Fqfavqz9aVWqgOOjjGUI6X1NSfk8=; h=From:To:Cc:Subject:Date:From; b=zbAZrEXMO1+cKK+fADsqo8NgKpIqQXfGpf9gEszolYZakFr4BBg9/+A95+t8GRJBG K4Gm4YlZRaUxty/vZIxlyJ44AvkeODYshZOyemPmNx5re5AYE1DxkKCqF45JwJ2tXv cQSg4nCcRS+OY8HJUHT1EJHLKJvIdDrRyREDk2CwT2062Sn5RgkaPb1Z6avVSDOt/W ldyCuePB4skoeTysz4yOBeamX8n5c2RlG1whdzQGQ8PboSjfvwJP70z6NiHRiRHxB3 sYYioc0GVnz4vXFQVq0xovZZPh3uZMtEWcQN2QkgKzLc5UghGv9CDZJwwzHozsHcmz bn3FSHNpvfA/Q== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) {