From patchwork Fri Feb 26 06:22:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 8431941 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C1F21C0553 for ; Fri, 26 Feb 2016 06:26:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9FEC201ED for ; Fri, 26 Feb 2016 06:26:57 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 16A3820145 for ; Fri, 26 Feb 2016 06:26:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBpK-0006Hs-Lm; Fri, 26 Feb 2016 06:24:34 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aZBpJ-0006Ed-DN for xen-devel@lists.xen.org; Fri, 26 Feb 2016 06:24:33 +0000 Received: from [85.158.139.211] by server-12.bemta-5.messagelabs.com id 8C/5C-02994-0AFEFC65; Fri, 26 Feb 2016 06:24:32 +0000 X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-4.tower-206.messagelabs.com!1456467867!25144174!1 X-Originating-IP: [58.251.152.64] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 61708 invoked from network); 26 Feb 2016 06:24:31 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-4.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 26 Feb 2016 06:24:31 -0000 Received: from 172.24.1.47 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.1.47]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DFG21631; Fri, 26 Feb 2016 14:24:16 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.235.1; Fri, 26 Feb 2016 14:24:05 +0800 From: Shannon Zhao To: Date: Fri, 26 Feb 2016 14:22:59 +0800 Message-ID: <1456467780-8476-22-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1456467780-8476-1-git-send-email-zhaoshenglong@huawei.com> References: <1456467780-8476-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.0A020202.56CFEF91.000D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c6cfa8051d7781f0f76ba32afa25bd27 Cc: peter.huangpeng@huawei.com, stefano.stabellini@citrix.com, ian.campbell@citrix.com, shannon.zhao@linaro.org Subject: [Xen-devel] [PATCH v5 21/22] 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" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- V5: remove __init from the declaration --- 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 *