[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN][PATCH v6 03/19] common/device_tree: change __unflatten_device_tree() type


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Vikram Garhwal <vikram.garhwal@xxxxxxx>
  • Date: Tue, 2 May 2023 16:36:34 -0700
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qGBrlYz1MYPx3dVlqExLGnD1JoxqWVU0WGIisylldqw=; b=JGM+vcyC9zcVJ2lePJixNlxjB8OaBGl9kNpIMLOyiWdAyyaFllsWoph8OQu0PUe+WBjm7p5F9YKGVaP3cUkvauBksR2KigrhusO5wEBshJnBuHjtluCBEoW9hm8cgySyGsYiL3VoemRRJ6hSBwbGPxdwMQGh3ZbLsYlXYbIvQ80PiYAL9Ew0KohhuJm5SrL5K3d95bUblb9tydvbEWK3QYC/4R5oG2xOM4CmS58xTI0Rij8YK+/F2Q5JQeZ/kNHRDSOoG/LFQOfloIeFMAjvGBUnSSh8I7BAz7TRS6jIkI1Xv0WuvvQn+tSVfnwWCxj0CN6qgNbSQZpgzWP9jkqn0A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QTtkvu0gTNoHijYkh0caIcnZNMVLdlec5IVV1/GIiTyjW8HTmKScMudSqSiA3htV1cZ8vvhz5Bp/iZxudHo6+QUlCAtUcKThf+SRQ50LgjN9tHlngZkudxvpRTONEh2X3jrIQ7j0XDW1jl44qpHXArcZOmLeQibWvf31pSHUv/3Jiov4FyS8ANGHpCEQ16Ebhp3dmYOCLLU3oSD/5GM2sHD9RM0YdolPfIPFvsv5spS352CyEZZBn0DTy/bewuV3hojwbfrFIuT31bYRiCcbai+i86Qs9LrNF5edALt1qcC4S5osQ/yQ3mYm9BwHeuQzP/8yg1iio7VIktsgVQ8pxA==
  • Cc: <sstabellini@xxxxxxxxxx>, <vikram.garhwal@xxxxxxx>, <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Tue, 02 May 2023 23:37:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Following changes are done to __unflatten_device_tree():
    1. __unflatten_device_tree() is renamed to unflatten_device_tree().
    2. Remove __init and static function type.

Signed-off-by: Vikram Garhwal <vikram.garhwal@xxxxxxx>
---
 xen/common/device_tree.c      | 9 ++++-----
 xen/include/xen/device_tree.h | 5 +++++
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index fc38a0b3dd..5daf5197bd 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -2047,7 +2047,7 @@ static unsigned long unflatten_dt_node(const void *fdt,
 }
 
 /**
- * __unflatten_device_tree - create tree of device_nodes from flat blob
+ * unflatten_device_tree - create tree of device_nodes from flat blob
  *
  * unflattens a device-tree, creating the
  * tree of struct device_node. It also fills the "name" and "type"
@@ -2056,8 +2056,7 @@ static unsigned long unflatten_dt_node(const void *fdt,
  * @fdt: The fdt to expand
  * @mynodes: The device_node tree created by the call
  */
-static int __init __unflatten_device_tree(const void *fdt,
-                                          struct dt_device_node **mynodes)
+int unflatten_device_tree(const void *fdt, struct dt_device_node **mynodes)
 {
     unsigned long start, mem, size;
     struct dt_device_node **allnextp = mynodes;
@@ -2183,9 +2182,9 @@ dt_find_interrupt_controller(const struct dt_device_match 
*matches)
 
 void __init dt_unflatten_host_device_tree(void)
 {
-    int error = __unflatten_device_tree(device_tree_flattened, &dt_host);
+    int error = unflatten_device_tree(device_tree_flattened, &dt_host);
     if ( error )
-        panic("__unflatten_device_tree failed with error %d\n", error);
+        panic("unflatten_device_tree failed with error %d\n", error);
 
     dt_alias_scan();
 }
diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
index 19a74909ce..eef0335b79 100644
--- a/xen/include/xen/device_tree.h
+++ b/xen/include/xen/device_tree.h
@@ -178,6 +178,11 @@ int device_tree_for_each_node(const void *fdt, int node,
  */
 void dt_unflatten_host_device_tree(void);
 
+/**
+ * unflatten any device tree.
+ */
+int unflatten_device_tree(const void *fdt, struct dt_device_node **mynodes);
+
 /**
  * IRQ translation callback
  * TODO: For the moment we assume that we only have ONE
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.