On 05.06.23 11:15, Roland Hieber wrote: > On Wed, May 31, 2023 at 05:13:32PM +0200, Ahmad Fatoum wrote: >> These variables were recently added, but are unused. Drop them. >> >> Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de> >> --- >> src/libdt.c | 7 ++----- >> 1 file changed, 2 insertions(+), 5 deletions(-) >> >> diff --git a/src/libdt.c b/src/libdt.c >> index 44491a5e739b..302ca7a76375 100644 >> --- a/src/libdt.c >> +++ b/src/libdt.c >> @@ -2365,7 +2365,6 @@ static struct udev_device >> *of_find_device_by_uuid(struct udev_device *parent, >> struct udev *udev; >> struct udev_enumerate *enumerate; >> struct udev_list_entry *devices, *dev_list_entry; >> - int ret = 0; >> >> udev = udev_new(); >> if (!udev) { >> @@ -2380,7 +2379,7 @@ static struct udev_device >> *of_find_device_by_uuid(struct udev_device *parent, >> udev_enumerate_scan_devices(enumerate); >> devices = udev_enumerate_get_list_entry(enumerate); >> udev_list_entry_foreach(dev_list_entry, devices) { >> - const char *path, *devtype, *outpath, *dev_uuid; >> + const char *path, *devtype, *dev_uuid; >> struct udev_device *device; >> const char *property; >> >> @@ -2400,10 +2399,8 @@ static struct udev_device >> *of_find_device_by_uuid(struct udev_device *parent, >> property = "ID_PART_ENTRY_UUID"; > > I'm not completely sure which version of the code you are referencing > here because I cannot find that context, but …
I replied on mol's series with two fixups that should be squashed. One of them removes *outdir, which is written, but never read. > >> dev_uuid = udev_device_get_property_value(device, property); >> - if (dev_uuid && !strcasecmp(dev_uuid, uuid)) { >> - outpath = udev_device_get_devnode(device); > > in mol's v4 patch there's another "outpath" occurrence in the > 'if (!strcmp(devtype, "disk"))' block above that. > > - Roland > >> + if (dev_uuid && !strcasecmp(dev_uuid, uuid)) >> return device; >> - } >> } >> return NULL; >> } >> -- >> 2.39.2 >> >> >> > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |