diff mbox series

[3/9] ram: stm32mp1: don't display the prompt two times

Message ID 20200306111355.3.I6004c77337da88fcc073b421245687c3f74b30a8@changeid
State Accepted
Commit 1c55a91b9d35ddd30a37bb5efe4ba1ea66b5720d
Headers show
Series ram: stm32mp1: fixes | expand

Commit Message

Patrick Delaunay March 6, 2020, 10:14 a.m. UTC
Remove one "DDR>" display on command
- next
- step
- go

Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

 drivers/ram/stm32mp1/stm32mp1_interactive.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Patrice CHOTARD March 18, 2020, 9:39 a.m. UTC | #1
On 3/6/20 11:14 AM, Patrick Delaunay wrote:
> Remove one "DDR>" display on command
> - next
> - step
> - go
>
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---
>
>  drivers/ram/stm32mp1/stm32mp1_interactive.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
> index cc9b2e7c96..cedf92cb5f 100644
> --- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
> +++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
> @@ -367,7 +367,6 @@ bool stm32mp1_ddr_interactive(void *priv,
>  			      enum stm32mp1_ddr_interact_step step,
>  			      const struct stm32mp1_ddr_config *config)
>  {
> -	const char *prompt = "DDR>";
>  	char buffer[CONFIG_SYS_CBSIZE];
>  	char *argv[CONFIG_SYS_MAXARGS + 1];	/* NULL terminated */
>  	int argc;
> @@ -403,13 +402,12 @@ bool stm32mp1_ddr_interactive(void *priv,
>  	}
>  
>  	printf("%d:%s\n", step, step_str[step]);
> -	printf("%s\n", prompt);
>  
>  	if (next_step > step)
>  		return false;
>  
>  	while (next_step == step) {
> -		cli_readline_into_buffer(prompt, buffer, 0);
> +		cli_readline_into_buffer("DDR>", buffer, 0);
>  		argc = cli_simple_parse_line(buffer, argv);
>  		if (!argc)
>  			continue;

Acked-by: Patrice Chotard <patrice.chotard at st.com>

Thanks

Patrice
Patrick Delaunay March 24, 2020, 8:49 a.m. UTC | #2
Hi,

> From: Patrick DELAUNAY <patrick.delaunay at st.com>
> Sent: vendredi 6 mars 2020 11:14
> 
> Remove one "DDR>" display on command
> - next
> - step
> - go
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
> ---


Applied to u-boot-stm/next, thanks!

Regards

Patrick
diff mbox series

Patch

diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index cc9b2e7c96..cedf92cb5f 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -367,7 +367,6 @@  bool stm32mp1_ddr_interactive(void *priv,
 			      enum stm32mp1_ddr_interact_step step,
 			      const struct stm32mp1_ddr_config *config)
 {
-	const char *prompt = "DDR>";
 	char buffer[CONFIG_SYS_CBSIZE];
 	char *argv[CONFIG_SYS_MAXARGS + 1];	/* NULL terminated */
 	int argc;
@@ -403,13 +402,12 @@  bool stm32mp1_ddr_interactive(void *priv,
 	}
 
 	printf("%d:%s\n", step, step_str[step]);
-	printf("%s\n", prompt);
 
 	if (next_step > step)
 		return false;
 
 	while (next_step == step) {
-		cli_readline_into_buffer(prompt, buffer, 0);
+		cli_readline_into_buffer("DDR>", buffer, 0);
 		argc = cli_simple_parse_line(buffer, argv);
 		if (!argc)
 			continue;