The efi_dp_match() function is unused since commit c409593d0853
("efi_loader: fix efi_dp_find_obj()"); remove it.

Signed-off-by: Vincent Stehlé <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Tom Rini <[email protected]>
---
 include/efi_device_path.h        | 19 -------------------
 lib/efi_loader/efi_device_path.c | 22 ----------------------
 2 files changed, 41 deletions(-)

diff --git a/include/efi_device_path.h b/include/efi_device_path.h
index aae85228f68..034a476887e 100644
--- a/include/efi_device_path.h
+++ b/include/efi_device_path.h
@@ -33,25 +33,6 @@ extern const struct efi_device_path EFI_DP_END;
  */
 struct efi_device_path *efi_dp_next(const struct efi_device_path *dp);
 
-/**
- * efi_dp_match() - Compare two device-paths
- *
- * Compare two device paths node by node. The comparison stops when an End
- * node is reached in the shorter of the two paths. This is useful, for 
example,
- * to compare a device-path representing a device with one representing a file
- * on that device, or a device with a parent device.
- *
- * @a: Pointer to the first device path.
- * @b: Pointer to the second device path.
- * Return: An integer less than, equal to, or greater than zero if the first
- * differing node in 'a' is found, respectively, to be less than,
- * to match, or be greater than the corresponding node in 'b'. Returns 0
- * if they match up to the end of the shorter path. Compares length first,
- * then content.
- */
-int efi_dp_match(const struct efi_device_path *a,
-                const struct efi_device_path *b);
-
 /**
  * efi_dp_shorten() - shorten device-path
  *
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 9efb158f5dd..0389af23906 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -60,28 +60,6 @@ struct efi_device_path *efi_dp_next(const struct 
efi_device_path *dp)
        return (struct efi_device_path *)dp;
 }
 
-int efi_dp_match(const struct efi_device_path *a,
-                const struct efi_device_path *b)
-{
-       while (1) {
-               int ret;
-
-               ret = memcmp(&a->length, &b->length, sizeof(a->length));
-               if (ret)
-                       return ret;
-
-               ret = memcmp(a, b, a->length);
-               if (ret)
-                       return ret;
-
-               a = efi_dp_next(a);
-               b = efi_dp_next(b);
-
-               if (!a || !b)
-                       return 0;
-       }
-}
-
 struct efi_device_path *efi_dp_shorten(struct efi_device_path *dp)
 {
        while (dp) {

---
base-commit: cc557af4553382f6f50e3ed62b9577054e7bc54f
change-id: 20260904-dead-190dd2512e4b

Best regards,
--  
Vincent.

Reply via email to