All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] efi_loader: efi_dp_from_lo() unused parameter size
@ 2021-10-15  0:09 Heinrich Schuchardt
  2021-10-15  7:32 ` Ilias Apalodimas
  0 siblings, 1 reply; 2+ messages in thread
From: Heinrich Schuchardt @ 2021-10-15  0:09 UTC (permalink / raw)
  To: u-boot
  Cc: AKASHI Takahiro, Ilias Apalodimas, Alexander Graf, Heinrich Schuchardt

Parameter size is never used in function efi_dp_from_lo(). Remove it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 cmd/efidebug.c                   | 3 +--
 include/efi_loader.h             | 1 -
 lib/efi_loader/efi_device_path.c | 2 --
 lib/efi_loader/efi_helper.c      | 2 +-
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 70a4658012..33a5135ee1 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -1144,7 +1144,6 @@ static void show_efi_boot_opt_data(u16 *varname16, void *data, size_t *size)
 	struct efi_device_path *initrd_path = NULL;
 	struct efi_load_option lo;
 	efi_status_t ret;
-	efi_uintn_t initrd_dp_size;
 	const efi_guid_t lf2_initrd_guid = EFI_INITRD_MEDIA_GUID;

 	ret = efi_deserialize_load_option(&lo, data, size);
@@ -1166,7 +1165,7 @@ static void show_efi_boot_opt_data(u16 *varname16, void *data, size_t *size)

 	printf("  file_path: %pD\n", lo.file_path);

-	initrd_path = efi_dp_from_lo(&lo, &initrd_dp_size, &lf2_initrd_guid);
+	initrd_path = efi_dp_from_lo(&lo, &lf2_initrd_guid);
 	if (initrd_path) {
 		printf("  initrd_path: %pD\n", initrd_path);
 		efi_free_pool(initrd_path);
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 6e806f9b0d..3e5ac38042 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -842,7 +842,6 @@ struct efi_load_option {
 };

 struct efi_device_path *efi_dp_from_lo(struct efi_load_option *lo,
-				       efi_uintn_t *size,
 				       const efi_guid_t *guid);
 struct efi_device_path *efi_dp_concat(const struct efi_device_path *dp1,
 				      const struct efi_device_path *dp2);
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index c3139f8e64..aaf1999d46 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -1263,7 +1263,6 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
  *                    initrd location
  *
  * @lo:		EFI_LOAD_OPTION containing a valid device path
- * @size:	size of the discovered device path
  * @guid:	guid to search for
  *
  * Return:
@@ -1272,7 +1271,6 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
  */
 struct
 efi_device_path *efi_dp_from_lo(struct efi_load_option *lo,
-				efi_uintn_t *size,
 				const efi_guid_t *guid)
 {
 	struct efi_device_path *fp = lo->file_path;
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
index 4c5b7cd2e1..89833de222 100644
--- a/lib/efi_loader/efi_helper.c
+++ b/lib/efi_loader/efi_helper.c
@@ -83,7 +83,7 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid)
 	if (ret != EFI_SUCCESS)
 		goto out;

-	tmp = efi_dp_from_lo(&lo, &size, &guid);
+	tmp = efi_dp_from_lo(&lo, &guid);
 	if (!tmp)
 		goto out;

--
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] efi_loader: efi_dp_from_lo() unused parameter size
  2021-10-15  0:09 [PATCH 1/1] efi_loader: efi_dp_from_lo() unused parameter size Heinrich Schuchardt
@ 2021-10-15  7:32 ` Ilias Apalodimas
  0 siblings, 0 replies; 2+ messages in thread
From: Ilias Apalodimas @ 2021-10-15  7:32 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: u-boot, AKASHI Takahiro, Alexander Graf

On Fri, Oct 15, 2021 at 02:09:33AM +0200, Heinrich Schuchardt wrote:
> Parameter size is never used in function efi_dp_from_lo(). Remove it.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  cmd/efidebug.c                   | 3 +--
>  include/efi_loader.h             | 1 -
>  lib/efi_loader/efi_device_path.c | 2 --
>  lib/efi_loader/efi_helper.c      | 2 +-
>  4 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/cmd/efidebug.c b/cmd/efidebug.c
> index 70a4658012..33a5135ee1 100644
> --- a/cmd/efidebug.c
> +++ b/cmd/efidebug.c
> @@ -1144,7 +1144,6 @@ static void show_efi_boot_opt_data(u16 *varname16, void *data, size_t *size)
>  	struct efi_device_path *initrd_path = NULL;
>  	struct efi_load_option lo;
>  	efi_status_t ret;
> -	efi_uintn_t initrd_dp_size;
>  	const efi_guid_t lf2_initrd_guid = EFI_INITRD_MEDIA_GUID;
> 
>  	ret = efi_deserialize_load_option(&lo, data, size);
> @@ -1166,7 +1165,7 @@ static void show_efi_boot_opt_data(u16 *varname16, void *data, size_t *size)
> 
>  	printf("  file_path: %pD\n", lo.file_path);
> 
> -	initrd_path = efi_dp_from_lo(&lo, &initrd_dp_size, &lf2_initrd_guid);
> +	initrd_path = efi_dp_from_lo(&lo, &lf2_initrd_guid);
>  	if (initrd_path) {
>  		printf("  initrd_path: %pD\n", initrd_path);
>  		efi_free_pool(initrd_path);
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 6e806f9b0d..3e5ac38042 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -842,7 +842,6 @@ struct efi_load_option {
>  };
> 
>  struct efi_device_path *efi_dp_from_lo(struct efi_load_option *lo,
> -				       efi_uintn_t *size,
>  				       const efi_guid_t *guid);
>  struct efi_device_path *efi_dp_concat(const struct efi_device_path *dp1,
>  				      const struct efi_device_path *dp2);
> diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
> index c3139f8e64..aaf1999d46 100644
> --- a/lib/efi_loader/efi_device_path.c
> +++ b/lib/efi_loader/efi_device_path.c
> @@ -1263,7 +1263,6 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
>   *                    initrd location
>   *
>   * @lo:		EFI_LOAD_OPTION containing a valid device path
> - * @size:	size of the discovered device path
>   * @guid:	guid to search for
>   *
>   * Return:
> @@ -1272,7 +1271,6 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
>   */
>  struct
>  efi_device_path *efi_dp_from_lo(struct efi_load_option *lo,
> -				efi_uintn_t *size,
>  				const efi_guid_t *guid)
>  {
>  	struct efi_device_path *fp = lo->file_path;
> diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c
> index 4c5b7cd2e1..89833de222 100644
> --- a/lib/efi_loader/efi_helper.c
> +++ b/lib/efi_loader/efi_helper.c
> @@ -83,7 +83,7 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid)
>  	if (ret != EFI_SUCCESS)
>  		goto out;
> 
> -	tmp = efi_dp_from_lo(&lo, &size, &guid);
> +	tmp = efi_dp_from_lo(&lo, &guid);
>  	if (!tmp)
>  		goto out;
> 
> --
> 2.30.2
> 

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-15  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15  0:09 [PATCH 1/1] efi_loader: efi_dp_from_lo() unused parameter size Heinrich Schuchardt
2021-10-15  7:32 ` 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.