[PATCH 10/11] dm: core: Drop unused parameter from dm_scan_fdt()

Simon Glass sjg at chromium.org
Sun Nov 29 01:50:09 CET 2020


This doesn't need to be passed the devicetree anymore. Drop it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/core/root.c | 9 ++++-----
 include/dm/root.h   | 3 +--
 test/dm/core.c      | 2 +-
 test/dm/test-fdt.c  | 2 +-
 test/dm/test-main.c | 2 +-
 5 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/core/root.c b/drivers/core/root.c
index 62efa0fedcf..54498b2df71 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -248,13 +248,12 @@ int dm_scan_fdt_dev(struct udevice *dev)
 				gd->flags & GD_FLG_RELOC ? false : true);
 }
 
-int dm_scan_fdt(const void *blob, bool pre_reloc_only)
+int dm_scan_fdt(bool pre_reloc_only)
 {
 	return dm_scan_fdt_node(gd->dm_root, ofnode_root(), pre_reloc_only);
 }
 
-static int dm_scan_fdt_ofnode_path(const void *blob, const char *path,
-				   bool pre_reloc_only)
+static int dm_scan_fdt_ofnode_path(const char *path, bool pre_reloc_only)
 {
 	ofnode node;
 
@@ -272,7 +271,7 @@ int dm_extended_scan_fdt(const void *blob, bool pre_reloc_only)
 		"/firmware"
 	};
 
-	ret = dm_scan_fdt(blob, pre_reloc_only);
+	ret = dm_scan_fdt(pre_reloc_only);
 	if (ret) {
 		debug("dm_scan_fdt() failed: %d\n", ret);
 		return ret;
@@ -280,7 +279,7 @@ int dm_extended_scan_fdt(const void *blob, bool pre_reloc_only)
 
 	/* Some nodes aren't devices themselves but may contain some */
 	for (i = 0; i < ARRAY_SIZE(nodes); i++) {
-		ret = dm_scan_fdt_ofnode_path(blob, nodes[i], pre_reloc_only);
+		ret = dm_scan_fdt_ofnode_path(nodes[i], pre_reloc_only);
 		if (ret) {
 			debug("dm_scan_fdt() scan for %s failed: %d\n",
 			      nodes[i], ret);
diff --git a/include/dm/root.h b/include/dm/root.h
index c8d629ba9bf..e277ebb9523 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -47,12 +47,11 @@ int dm_scan_platdata(bool pre_reloc_only);
  * This scans the device tree and creates a driver for each node. Only
  * the top-level subnodes are examined.
  *
- * @blob: Pointer to device tree blob
  * @pre_reloc_only: If true, bind only nodes with special devicetree properties,
  * or drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers.
  * @return 0 if OK, -ve on error
  */
-int dm_scan_fdt(const void *blob, bool pre_reloc_only);
+int dm_scan_fdt(bool pre_reloc_only);
 
 /**
  * dm_extended_scan_fdt() - Scan the device tree and bind drivers
diff --git a/test/dm/core.c b/test/dm/core.c
index ba9e60d09cb..71ebb36d88b 100644
--- a/test/dm/core.c
+++ b/test/dm/core.c
@@ -486,7 +486,7 @@ static int dm_test_leak(struct unit_test_state *uts)
 		dm_leak_check_start(uts);
 
 		ut_assertok(dm_scan_platdata(false));
-		ut_assertok(dm_scan_fdt(gd->fdt_blob, false));
+		ut_assertok(dm_scan_fdt(false));
 
 		/* Scanning the uclass is enough to probe all the devices */
 		for (id = UCLASS_ROOT; id < UCLASS_COUNT; id++) {
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index cc12419ea0f..9507636b630 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -308,7 +308,7 @@ static int dm_test_fdt_pre_reloc(struct unit_test_state *uts)
 	struct uclass *uc;
 	int ret;
 
-	ret = dm_scan_fdt(gd->fdt_blob, true);
+	ret = dm_scan_fdt(true);
 	ut_assert(!ret);
 
 	ret = uclass_get(UCLASS_TEST_FDT, &uc);
diff --git a/test/dm/test-main.c b/test/dm/test-main.c
index fd24635006c..2ab73b647e6 100644
--- a/test/dm/test-main.c
+++ b/test/dm/test-main.c
@@ -213,7 +213,7 @@ int dm_test_main(const char *test_name)
 	ut_assertok(dm_init(CONFIG_IS_ENABLED(OF_LIVE)));
 	dm_scan_platdata(false);
 	if (!CONFIG_IS_ENABLED(OF_PLATDATA))
-		dm_scan_fdt(gd->fdt_blob, false);
+		dm_scan_fdt(false);
 
 	return uts->fail_count ? CMD_RET_FAILURE : 0;
 }
-- 
2.29.2.454.gaff20da3a2-goog



More information about the U-Boot mailing list