From patchwork Wed Mar 2 07:34:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 63373 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2242410lbc; Tue, 1 Mar 2016 23:37:57 -0800 (PST) X-Received: by 10.140.231.80 with SMTP id b77mr33882846qhc.56.1456904262646; Tue, 01 Mar 2016 23:37:42 -0800 (PST) Return-Path: Received: from lists.xen.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id i64si34837146qhc.61.2016.03.01.23.37.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Mar 2016 23:37:42 -0800 (PST) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1ab1Kp-0005Dx-So; Wed, 02 Mar 2016 07:36:39 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1ab1Kn-0005C5-Ri for xen-devel@lists.xen.org; Wed, 02 Mar 2016 07:36:37 +0000 Received: from [193.109.254.147] by server-14.bemta-14.messagelabs.com id 56/45-02987-50896D65; Wed, 02 Mar 2016 07:36:37 +0000 X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1456904192!27729316!1 X-Originating-IP: [119.145.14.66] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NiA9PiA4NTI3\n X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34072 invoked from network); 2 Mar 2016 07:36:36 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-3.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 2 Mar 2016 07:36:36 -0000 Received: from 172.24.1.47 (EHLO SZXEML424-HUB.china.huawei.com) ([172.24.1.47]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BXB04023; Wed, 02 Mar 2016 15:35:47 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML424-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.235.1; Wed, 2 Mar 2016 15:35:25 +0800 From: Shannon Zhao To: Date: Wed, 2 Mar 2016 15:34:42 +0800 Message-ID: <1456904083-13168-17-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1456904083-13168-1-git-send-email-zhaoshenglong@huawei.com> References: <1456904083-13168-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.56D697D9.00C4, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 519fffa17f7b12fa2c37cd363f6341d1 Cc: zhaoshenglong@huawei.com, stefano.stabellini@citrix.com, ian.campbell@citrix.com, shannon.zhao@linaro.org Subject: [Xen-devel] [PATCH v8 16/17] arm/fdt: Export device_tree_for_each_node X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" From: Shannon Zhao This function will be used by ACPI booting. Export it so that it can be used by other files. Signed-off-by: Shannon Zhao Reviewed-by: Stefano Stabellini --- xen/arch/arm/bootfdt.c | 6 +++--- xen/include/xen/device_tree.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 74d208b..8a14015 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -85,9 +85,9 @@ static u32 __init device_tree_get_u32(const void *fdt, int node, * Returns 0 if all nodes were iterated over successfully. If @func * returns a value different from 0, that value is returned immediately. */ -static int __init device_tree_for_each_node(const void *fdt, - device_tree_node_func func, - void *data) +int __init device_tree_for_each_node(const void *fdt, + device_tree_node_func func, + void *data) { int node; int depth; diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index cf31e50..e3fe77c 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -173,6 +173,10 @@ typedef int (*device_tree_node_func)(const void *fdt, extern const void *device_tree_flattened; +int device_tree_for_each_node(const void *fdt, + device_tree_node_func func, + void *data); + /** * dt_unflatten_host_device_tree - Unflatten the host device tree *