* [PATCH] efi_loader: remove unused function efi_dp_match()
@ 2026-09-04 15:58 Vincent Stehlé
2026-09-07 12:25 ` Ilias Apalodimas
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Stehlé @ 2026-09-04 15:58 UTC (permalink / raw)
To: u-boot
Cc: Heinrich Schuchardt, Ilias Apalodimas, Tom Rini, Simon Glass,
Vincent Stehlé
The efi_dp_match() function is unused since commit c409593d0853
("efi_loader: fix efi_dp_find_obj()"); remove it.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
---
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.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] efi_loader: remove unused function efi_dp_match()
2026-09-04 15:58 [PATCH] efi_loader: remove unused function efi_dp_match() Vincent Stehlé
@ 2026-09-07 12:25 ` Ilias Apalodimas
0 siblings, 0 replies; 2+ messages in thread
From: Ilias Apalodimas @ 2026-09-07 12:25 UTC (permalink / raw)
To: Vincent Stehlé; +Cc: u-boot, Heinrich Schuchardt, Tom Rini, Simon Glass
[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]
On Fri, 4 Sept 2026 at 18:58, Vincent Stehlé <vincent.stehle@arm.com> wrote:
> The efi_dp_match() function is unused since commit c409593d0853
> ("efi_loader: fix efi_dp_find_obj()"); remove it.
>
> Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> 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.
>
>
[-- Attachment #2: Type: text/html, Size: 4424 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-07 12:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04 15:58 [PATCH] efi_loader: remove unused function efi_dp_match() Vincent Stehlé
2026-09-07 12:25 ` Ilias Apalodimas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.