All of lore.kernel.org
 help / color / mirror / Atom feed
* Fwd: [PATCH 1/1] riscv: use log functions in fdt_fixup
       [not found] <20200629072136.GA313@andestech.com>
@ 2020-06-29  9:08 ` Heinrich Schuchardt
  0 siblings, 0 replies; only message in thread
From: Heinrich Schuchardt @ 2020-06-29  9:08 UTC (permalink / raw)
  To: u-boot

-------- Forwarded Message --------
Subject: Re: [PATCH 1/1] riscv: use log functions in fdt_fixup
Date: Mon, 29 Jun 2020 15:21:43 +0800
From: Leo Liang <ycliang@andestech.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>

On Fri, Jun 26, 2020 at 06:34:43AM +0200, Heinrich Schuchardt wrote:
> Replace printf() and debug() by log_err() and log_debug().
>
> "No reserved memory region found in source FDT\n" is not an error but a
> debug information.
>
> %s/can not/cannot/ - use the more common spelling.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/riscv/lib/fdt_fixup.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>

Reviewed-by: Leo Liang <ycliang@andestech.com>

> diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c
> index 6db48ad04a..c1dc247cf7 100644
> --- a/arch/riscv/lib/fdt_fixup.c
> +++ b/arch/riscv/lib/fdt_fixup.c
> @@ -37,7 +37,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst)
>
>  	offset = fdt_path_offset(src, "/reserved-memory");
>  	if (offset < 0) {
> -		printf("No reserved memory region found in source FDT\n");
> +		log_debug("No reserved memory region found in source FDT\n");
>  		return 0;
>  	}
>
> @@ -48,7 +48,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst)
>  							  "reg", 0, &size,
>  							  false);
>  		if (addr == FDT_ADDR_T_NONE) {
> -			debug("failed to read address/size for %s\n", name);
> +			log_debug("failed to read address/size for %s\n", name);
>  			continue;
>  		}
>  		strncpy(basename, name, max_len);
> @@ -63,7 +63,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst)
>  		err = fdtdec_add_reserved_memory(dst, basename, &pmp_mem,
>  						 &phandle);
>  		if (err < 0) {
> -			printf("failed to add reserved memory: %d\n", err);
> +			log_err("failed to add reserved memory: %d\n", err);
>  			return err;
>  		}
>  		if (!fdt_getprop(src, node, "no-map", NULL))
> @@ -109,7 +109,7 @@ int board_fix_fdt(void *fdt)
>
>  	err = riscv_board_reserved_mem_fixup(fdt);
>  	if (err < 0) {
> -		printf("failed to fixup DT for reserved memory: %d\n", err);
> +		log_err("failed to fixup DT for reserved memory: %d\n", err);
>  		return err;
>  	}
>
> @@ -127,14 +127,14 @@ int arch_fixup_fdt(void *blob)
>  	size = fdt_totalsize(blob);
>  	err  = fdt_open_into(blob, blob, size + 32);
>  	if (err < 0) {
> -		printf("Device Tree can't be expanded to accommodate new node");
> +		log_err("Device Tree can't be expanded to accommodate new node");
>  		return err;
>  	}
>  	chosen_offset = fdt_path_offset(blob, "/chosen");
>  	if (chosen_offset < 0) {
>  		err = fdt_add_subnode(blob, 0, "chosen");
>  		if (err < 0) {
> -			printf("chosen node can not be added\n");
> +			log_err("chosen node cannot be added\n");
>  			return err;
>  		}
>  	}
> --
> 2.27.0
>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-29  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200629072136.GA313@andestech.com>
2020-06-29  9:08 ` Fwd: [PATCH 1/1] riscv: use log functions in fdt_fixup Heinrich Schuchardt

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.