diff mbox series

[39/67] ui/console: fold text_console_update_cursor_timer

Message ID 20230830093843.3531473-40-marcandre.lureau@redhat.com
State New
Headers show
Series Make pixman an optional dependency | expand

Commit Message

Marc-André Lureau Aug. 30, 2023, 9:38 a.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/console.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Philippe Mathieu-Daudé Aug. 30, 2023, 3:15 p.m. UTC | #1
On 30/8/23 11:38, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   ui/console.c | 10 ++--------
>   1 file changed, 2 insertions(+), 8 deletions(-)


>   static void text_console_update_cursor(void *opaque)
>   {
>       QemuConsole *s;
> @@ -2520,7 +2513,8 @@ static void text_console_update_cursor(void *opaque)
>       }
>   
>       if (count) {
> -        text_console_update_cursor_timer();
> +        timer_mod(cursor_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME)
> +                  + CONSOLE_CURSOR_PERIOD / 2);

This should be padded here         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>       }
>   }
>
Daniel P. Berrangé Sept. 1, 2023, 4:51 p.m. UTC | #2
On Wed, Aug 30, 2023 at 01:38:13PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  ui/console.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
diff mbox series

Patch

diff --git a/ui/console.c b/ui/console.c
index 04ec2d2488..c31368667d 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -174,7 +174,6 @@  static QEMUTimer *cursor_timer;
 
 static void dpy_refresh(DisplayState *s);
 static DisplayState *get_alloc_displaystate(void);
-static void text_console_update_cursor_timer(void);
 static void text_console_update_cursor(void *opaque);
 static bool displaychangelistener_has_dmabuf(DisplayChangeListener *dcl);
 static bool console_compatible_with(QemuConsole *con,
@@ -2497,12 +2496,6 @@  static void vc_chr_set_echo(Chardev *chr, bool echo)
     drv->console->echo = echo;
 }
 
-static void text_console_update_cursor_timer(void)
-{
-    timer_mod(cursor_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME)
-              + CONSOLE_CURSOR_PERIOD / 2);
-}
-
 static void text_console_update_cursor(void *opaque)
 {
     QemuConsole *s;
@@ -2520,7 +2513,8 @@  static void text_console_update_cursor(void *opaque)
     }
 
     if (count) {
-        text_console_update_cursor_timer();
+        timer_mod(cursor_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME)
+                  + CONSOLE_CURSOR_PERIOD / 2);
     }
 }