[PATCH 03/16] blspec: remove unused blspec_scan_devices
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue Apr 1 03:47:53 PDT 2025
The function is called nowhere and removing it simplifies the
incoming refactoring of the blspec code.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/blspec.c | 29 -----------------------------
include/blspec.h | 2 --
2 files changed, 31 deletions(-)
diff --git a/common/blspec.c b/common/blspec.c
index 740726a571d2..c4e65906ad9f 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -557,35 +557,6 @@ static int blspec_scan_cdev(struct bootentries *bootentries, struct cdev *cdev)
return found;
}
-/*
- * blspec_scan_devices - scan all devices for child cdevs
- *
- * Iterate over all devices and collect child their cdevs.
- * Returns the number of entries found or a negative error code if some unexpected
- * error occurred.
- */
-int blspec_scan_devices(struct bootentries *bootentries)
-{
- struct device *dev;
- struct block_device *bdev;
- int ret, found = 0;
-
- for_each_device(dev)
- device_detect(dev);
-
- for_each_block_device(bdev) {
- struct cdev *cdev;
-
- list_for_each_entry(cdev, &bdev->dev->cdevs, devices_list) {
- ret = blspec_scan_cdev(bootentries, cdev);
- if (ret > 0)
- found += ret;
- }
- }
-
- return found;
-}
-
/*
* blspec_scan_device - scan a device for child cdevs
*
diff --git a/include/blspec.h b/include/blspec.h
index affcea9a0ad5..cebc7a648703 100644
--- a/include/blspec.h
+++ b/include/blspec.h
@@ -18,8 +18,6 @@ int blspec_entry_var_set(struct blspec_entry *entry, const char *name,
const char *val);
const char *blspec_entry_var_get(struct blspec_entry *entry, const char *name);
-int blspec_scan_devices(struct bootentries *bootentries);
-
int blspec_scan_device(struct bootentries *bootentries, struct device *dev);
int blspec_scan_devicename(struct bootentries *bootentries, const char *devname);
int blspec_scan_directory(struct bootentries *bootentries, const char *root);
--
2.39.5
More information about the barebox
mailing list