diff mbox series

efi_loader: Use %pD to log device-path instead of local efi_dp_str()

Message ID 162623995338.251869.3448638991376913485.stgit@localhost
State Accepted
Commit 484d7d80cb55fba7955c9afe2e1981980206f518
Headers show
Series efi_loader: Use %pD to log device-path instead of local efi_dp_str() | expand

Commit Message

Masami Hiramatsu July 14, 2021, 5:19 a.m. UTC
Use %pD to log device-path instead of using efi_dp_str() and
efi_free_pool() locally in find_boot_device().
This is a cleanup patch, no feature update nor fix.

Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>

---
 lib/efi_loader/efi_capsule.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Heinrich Schuchardt July 16, 2021, 6:41 a.m. UTC | #1
On 7/14/21 7:19 AM, Masami Hiramatsu wrote:
> Use %pD to log device-path instead of using efi_dp_str() and

> efi_free_pool() locally in find_boot_device().

> This is a cleanup patch, no feature update nor fix.

>

> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>


Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


> ---

>   lib/efi_loader/efi_capsule.c |    6 +-----

>   1 file changed, 1 insertion(+), 5 deletions(-)

>

> diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c

> index b878e71438..a09c5705f1 100644

> --- a/lib/efi_loader/efi_capsule.c

> +++ b/lib/efi_loader/efi_capsule.c

> @@ -691,11 +691,7 @@ skip:

>   	}

>   found:

>   	if (boot_dev) {

> -		u16 *path_str;

> -

> -		path_str = efi_dp_str(boot_dev);

> -		log_debug("Boot device %ls\n", path_str);

> -		efi_free_pool(path_str);

> +		log_debug("Boot device %pD\n", boot_dev);

>

>   		volume = efi_fs_from_path(boot_dev);

>   		if (!volume)

>
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index b878e71438..a09c5705f1 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -691,11 +691,7 @@  skip:
 	}
 found:
 	if (boot_dev) {
-		u16 *path_str;
-
-		path_str = efi_dp_str(boot_dev);
-		log_debug("Boot device %ls\n", path_str);
-		efi_free_pool(path_str);
+		log_debug("Boot device %pD\n", boot_dev);
 
 		volume = efi_fs_from_path(boot_dev);
 		if (!volume)