diff mbox series

[1/1] rng: stm32mp1: use log() instead of printf()

Message ID 20200917145739.15100-1-xypron.glpk@gmx.de
State Accepted, archived
Commit cf0bf89227594cf3fdcae8242f023685cdd11cb7
Delegated to: Heinrich Schuchardt
Headers show
Series [1/1] rng: stm32mp1: use log() instead of printf() | expand

Commit Message

Heinrich Schuchardt Sept. 17, 2020, 2:57 p.m. UTC
The logging system provides flexible filtering and enhanced output.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 drivers/rng/stm32mp1_rng.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--
2.28.0

Comments

Sughosh Ganu Sept. 18, 2020, 6:23 a.m. UTC | #1
On Thu, 17 Sep 2020 at 20:27, Heinrich Schuchardt <xypron.glpk@gmx.de>
wrote:

> The logging system provides flexible filtering and enhanced output.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/rng/stm32mp1_rng.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>

Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>

-sughosh
Heinrich Schuchardt Sept. 18, 2020, 9:47 a.m. UTC | #2
On 9/18/20 8:23 AM, Sughosh Ganu wrote:
>
> On Thu, 17 Sep 2020 at 20:27, Heinrich Schuchardt <xypron.glpk@gmx.de
> <mailto:xypron.glpk@gmx.de>> wrote:
>
>     The logging system provides flexible filtering and enhanced output.
>
>     Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de
>     <mailto:xypron.glpk@gmx.de>>
>     ---
>      drivers/rng/stm32mp1_rng.c | 4 +++-
>      1 file changed, 3 insertions(+), 1 deletion(-)
>
>
> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org
> <mailto:sughosh.ganu@linaro.org>>

Thanks for reviewing.

I will add the patch to my next EFI pull request.

Best regards

Heinrich
Patrick DELAUNAY Sept. 21, 2020, 5:03 p.m. UTC | #3
Hi Heinrich

> From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Heinrich Schuchardt
> Sent: jeudi 17 septembre 2020 16:58
> To: Sughosh Ganu <sughosh.ganu@linaro.org>
> Cc: u-boot@lists.denx.de; Heinrich Schuchardt <xypron.glpk@gmx.de>
> Subject: [PATCH 1/1] rng: stm32mp1: use log() instead of printf()
> 
> The logging system provides flexible filtering and enhanced output.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  drivers/rng/stm32mp1_rng.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Even it is too late as already merged....

Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>

Do you expect that this STM32MP15X is  added in "ARM STM STM32MP" of MAINTAINERS file ?

	ARM STM STM32MP
	....
	+F:	drivers/rng/stm32mp1_rng.c	
 	...

Or the default rules is enough and Sughosh support all the rng drivers, whatever the platform ?

	RNG
	...
	F:	drivers/rng/


Thanks

Patrick
diff mbox series

Patch

diff --git a/drivers/rng/stm32mp1_rng.c b/drivers/rng/stm32mp1_rng.c
index 7ef7ff9756..c1bae180f7 100644
--- a/drivers/rng/stm32mp1_rng.c
+++ b/drivers/rng/stm32mp1_rng.c
@@ -3,6 +3,8 @@ 
  * Copyright (c) 2019, Linaro Limited
  */

+#define LOG_CATEGORY UCLASS_RNG
+
 #include <common.h>
 #include <clk.h>
 #include <dm.h>
@@ -53,7 +55,7 @@  static int stm32_rng_read(struct udevice *dev, void *data, size_t len)
 			for (i = 0; i < 12; i++)
 				readl(pdata->base + RNG_DR);
 			if (readl(pdata->base + RNG_SR) & RNG_SR_SEIS) {
-				printf("RNG Noise");
+				log_err("RNG Noise");
 				return -EIO;
 			}
 			/* start again */