diff mbox

[U-Boot,v2,03/11] cfb_console: Fix function console_back

Message ID 1335634011-9104-4-git-send-email-pali.rohar@gmail.com
State Accepted
Commit 04bbe6999048f74af00305cacae14a2d7faf2063
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Pali Rohár April 28, 2012, 5:26 p.m. UTC
* Do not disable and enable cursor again

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
---
 drivers/video/cfb_console.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Marek Vasut April 28, 2012, 10:15 p.m. UTC | #1
Dear Pali Rohár,

>  * Do not disable and enable cursor again

Can you elaborate please?

> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> ---
>  drivers/video/cfb_console.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
> index 904caf7..51ea167 100644
> --- a/drivers/video/cfb_console.c
> +++ b/drivers/video/cfb_console.c
> @@ -721,7 +721,6 @@ static void console_scrollup(void)
> 
>  static void console_back(void)
>  {
> -	CURSOR_OFF;
>  	console_col--;
> 
>  	if (console_col < 0) {
> @@ -730,7 +729,6 @@ static void console_back(void)
>  		if (console_row < 0)
>  			console_row = 0;
>  	}
> -	CURSOR_SET;
>  }
> 
>  static void console_newline(void)

Best regards,
Marek Vasut
Pali Rohár April 29, 2012, 7:24 a.m. UTC | #2
On Sunday 29 April 2012 00:15:58 Marek Vasut wrote:
> Dear Pali Rohár,
> 
> >  * Do not disable and enable cursor again
> 
> Can you elaborate please?
> 

console_back is called only from cfb putc function which already 
turn off cursor at begin and turn on at the end of call.

So function console_back will have always disabled cursor and is 
not needed to call turning it off again.
Wolfgang Denk April 29, 2012, 12:17 p.m. UTC | #3
Dear Pali =?ISO-8859-1?Q?Roh=E1r?=,

In message <1581447.hx3godgTju@pali> you wrote:
> 
> > Can you elaborate please?
> 
> console_back is called only from cfb putc function which already 
> turn off cursor at begin and turn on at the end of call.
> 
> So function console_back will have always disabled cursor and is 
> not needed to call turning it off again.

Such assumptions need to be documented, then.

Best regards,

Wolfgang Denk
Anatolij Gustschin May 19, 2012, 7:16 p.m. UTC | #4
Hi,

On Sat, 28 Apr 2012 19:26:43 +0200
Pali Rohár <pali.rohar@gmail.com> wrote:

>  * Do not disable and enable cursor again
> 
> Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> ---
>  drivers/video/cfb_console.c |    2 --
>  1 file changed, 2 deletions(-)

Applied to u-boot-video/master after extending the commit log.

Thanks,
Anatolij
Pali Rohár June 1, 2012, 6:42 p.m. UTC | #5
On Saturday 19 May 2012 21:16:13 Anatolij Gustschin wrote:
> Hi,
> 
> On Sat, 28 Apr 2012 19:26:43 +0200
> 
> Pali Rohár <pali.rohar@gmail.com> wrote:
> >  * Do not disable and enable cursor again
> > 
> > Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
> > ---
> > 
> >  drivers/video/cfb_console.c |    2 --
> >  1 file changed, 2 deletions(-)
> 
> Applied to u-boot-video/master after extending the commit log.
> 
> Thanks,
> Anatolij

Ok, when this patch will be in u-boot master?
Anatolij Gustschin June 4, 2012, 8:47 p.m. UTC | #6
Hi,

On Fri, 01 Jun 2012 20:42:29 +0200
Pali Rohár <pali.rohar@gmail.com> wrote:
...
> Ok, when this patch will be in u-boot master?

I'm going to submit my pull request soon. It will be in master when
Wolfgang pulls my tree.

Thanks,
Anatolij
diff mbox

Patch

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 904caf7..51ea167 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -721,7 +721,6 @@  static void console_scrollup(void)
 
 static void console_back(void)
 {
-	CURSOR_OFF;
 	console_col--;
 
 	if (console_col < 0) {
@@ -730,7 +729,6 @@  static void console_back(void)
 		if (console_row < 0)
 			console_row = 0;
 	}
-	CURSOR_SET;
 }
 
 static void console_newline(void)