[PATCH v1 12/12] fastboot: fb_nand: add missing newlines in pr_err() macro

Mattijs Korpershoek mkorpershoek at baylibre.com
Tue Jan 2 14:01:28 CET 2024


Hi Alexey,

Thank you for the patch.

On Thu, Dec 28, 2023 at 18:39, Alexey Romanov <avromanov at salutedevices.com> wrote:

> pr_err() doesn't add an newline symbol when printing.
>
> Signed-off-by: Alexey Romanov <avromanov at salutedevices.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>

> ---
>  drivers/fastboot/fb_nand.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/fastboot/fb_nand.c b/drivers/fastboot/fb_nand.c
> index 39d888301f..9db1903e41 100644
> --- a/drivers/fastboot/fb_nand.c
> +++ b/drivers/fastboot/fb_nand.c
> @@ -48,13 +48,13 @@ static int fb_nand_lookup(const char *partname,
>  
>  	ret = find_dev_and_part(partname, &dev, &pnum, part);
>  	if (ret) {
> -		pr_err("cannot find partition: '%s'", partname);
> +		pr_err("cannot find partition: '%s'\n", partname);
>  		fastboot_fail("cannot find partition", response);
>  		return ret;
>  	}
>  
>  	if (dev->id->type != MTD_DEV_TYPE_NAND && dev->id->type != MTD_DEV_TYPE_SPINAND) {
> -		pr_err("partition '%s' is not stored on a NAND device",
> +		pr_err("partition '%s' is not stored on a NAND device\n",
>  		      partname);
>  		fastboot_fail("not a NAND device", response);
>  		return -EINVAL;
> @@ -178,7 +178,7 @@ void fastboot_nand_flash_write(const char *cmd, void *download_buffer,
>  
>  	ret = fb_nand_lookup(cmd, &mtd, &part, response);
>  	if (ret) {
> -		pr_err("invalid NAND device");
> +		pr_err("invalid NAND device\n");
>  		fastboot_fail("invalid NAND device", response);
>  		return;
>  	}
> @@ -242,7 +242,7 @@ void fastboot_nand_erase(const char *cmd, char *response)
>  
>  	ret = fb_nand_lookup(cmd, &mtd, &part, response);
>  	if (ret) {
> -		pr_err("invalid NAND device");
> +		pr_err("invalid NAND device\n");
>  		fastboot_fail("invalid NAND device", response);
>  		return;
>  	}
> @@ -253,7 +253,7 @@ void fastboot_nand_erase(const char *cmd, char *response)
>  
>  	ret = _fb_nand_erase(mtd, part);
>  	if (ret) {
> -		pr_err("failed erasing from device %s", mtd->name);
> +		pr_err("failed erasing from device %s\n", mtd->name);
>  		fastboot_fail("failed erasing from device", response);
>  		return;
>  	}
> -- 
> 2.30.1


More information about the U-Boot mailing list