mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] imd: change disabled checksum tag info to debug
@ 2021-01-12  9:38 Steffen Trumtrar
  2021-01-13  9:06 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Steffen Trumtrar @ 2021-01-12  9:38 UTC (permalink / raw)
  To: barebox; +Cc: Steffen Trumtrar

From: Steffen Trumtrar <s.trumtrar@pengutronix.de>

When the checksum tag is disabled the CRC is most likely invalid.
And if the checksum tag is disabled and the CRC is actually invalid the
user doesn't care for it anyway.

This information only confuses the user so make it a debug message.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 common/imd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/imd.c b/common/imd.c
index ef9eff876b..aff3b00b6b 100644
--- a/common/imd.c
+++ b/common/imd.c
@@ -406,7 +406,7 @@ int imd_verify_crc32(void *buf, size_t size)
 			       *p, crc);
 			return -EILSEQ;
 		} else if (*p != crc && !imd_crc32_is_valid(*flags)) {
-			printf("CRC: is invalid, but the checksum tag is not enabled\n");
+			debug("CRC: is invalid, but the checksum tag is not enabled\n");
 			return -EINVAL;
 		} else {
 			printf("CRC: valid\n");
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] imd: change disabled checksum tag info to debug
  2021-01-12  9:38 [PATCH] imd: change disabled checksum tag info to debug Steffen Trumtrar
@ 2021-01-13  9:06 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2021-01-13  9:06 UTC (permalink / raw)
  To: Steffen Trumtrar; +Cc: barebox, Steffen Trumtrar

On Tue, Jan 12, 2021 at 10:38:01AM +0100, Steffen Trumtrar wrote:
> From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> 
> When the checksum tag is disabled the CRC is most likely invalid.
> And if the checksum tag is disabled and the CRC is actually invalid the
> user doesn't care for it anyway.
> 
> This information only confuses the user so make it a debug message.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  common/imd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks

Sascha

> 
> diff --git a/common/imd.c b/common/imd.c
> index ef9eff876b..aff3b00b6b 100644
> --- a/common/imd.c
> +++ b/common/imd.c
> @@ -406,7 +406,7 @@ int imd_verify_crc32(void *buf, size_t size)
>  			       *p, crc);
>  			return -EILSEQ;
>  		} else if (*p != crc && !imd_crc32_is_valid(*flags)) {
> -			printf("CRC: is invalid, but the checksum tag is not enabled\n");
> +			debug("CRC: is invalid, but the checksum tag is not enabled\n");
>  			return -EINVAL;
>  		} else {
>  			printf("CRC: valid\n");
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2021-01-13  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12  9:38 [PATCH] imd: change disabled checksum tag info to debug Steffen Trumtrar
2021-01-13  9:06 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox