[kvm-unit-tests PATCH v2 3/4] devicetree: remove unused globals

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

 



root_nr_address_cells and root_nr_size_cells are unused,
thanks to the last two patches. Remove them, and tidy-up
dt_init while at it.

Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>
---
 lib/devicetree.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/lib/devicetree.c b/lib/devicetree.c
index 2da7d22339a64..c091459a94e27 100644
--- a/lib/devicetree.c
+++ b/lib/devicetree.c
@@ -8,7 +8,6 @@
 #include "devicetree.h"
 
 static const void *fdt;
-static u32 root_nr_address_cells, root_nr_size_cells;
 
 const void *dt_fdt(void)
 {
@@ -278,21 +277,16 @@ int dt_get_default_console_node(void)
 
 int dt_init(const void *fdt_ptr)
 {
-	int root, ret;
+	int ret;
 
 	ret = fdt_check_header(fdt_ptr);
 	if (ret < 0)
 		return ret;
-	fdt = fdt_ptr;
-
-	root = fdt_path_offset(fdt, "/");
-	if (root < 0)
-		return root;
 
-	ret = dt_get_nr_cells(root, &root_nr_address_cells,
-				    &root_nr_size_cells);
+	ret = fdt_path_offset(fdt_ptr, "/");
 	if (ret < 0)
 		return ret;
 
+	fdt = fdt_ptr;
 	return 0;
 }
-- 
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux