mbox series

[0/7] consoles small cleanups

Message ID 20230712085942.5064-1-jirislaby@kernel.org
Headers show
Series consoles small cleanups | expand

Message

Jiri Slaby July 12, 2023, 8:59 a.m. UTC
This is a series to do some small cleanups, especially in vgacon.

Jiri Slaby (SUSE) (7):
  vgacon: switch vgacon_scrolldelta() and vgacon_restore_screen()
  vgacon: remove unneeded forward declarations
  vgacon: remove unused xpos from vgacon_set_cursor_size()
  vgacon: let vgacon_doresize() return void
  vgacon: cache vc_cell_height in vgacon_cursor()
  sticon: make sticon_set_def_font() void and remove op parameter
  fbcon: remove unused display (p) from fbcon_redraw()

 drivers/video/console/sticon.c   | 12 +++---
 drivers/video/console/vgacon.c   | 74 ++++++++++++--------------------
 drivers/video/fbdev/core/fbcon.c |  7 ++-
 3 files changed, 37 insertions(+), 56 deletions(-)

Comments

Helge Deller July 20, 2023, 6:16 a.m. UTC | #1
On 7/12/23 10:59, Jiri Slaby (SUSE) wrote:
> Switch vgacon_scrolldelta() and vgacon_restore_screen() positions, so
> that the former is not needed to be forward-declared.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org

Thanks Jiri !
I've applied this series to the fbdev git tree.

Helge

> ---
>   drivers/video/console/vgacon.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
> index e25ba523892e..fbed2862c317 100644
> --- a/drivers/video/console/vgacon.c
> +++ b/drivers/video/console/vgacon.c
> @@ -142,12 +142,6 @@ static inline void vga_set_mem_top(struct vc_data *c)
>   	write_vga(12, (c->vc_visible_origin - vga_vram_base) / 2);
>   }
>
> -static void vgacon_restore_screen(struct vc_data *c)
> -{
> -	if (c->vc_origin != c->vc_visible_origin)
> -		vgacon_scrolldelta(c, 0);
> -}
> -
>   static void vgacon_scrolldelta(struct vc_data *c, int lines)
>   {
>   	vc_scrolldelta_helper(c, lines, vga_rolled_over, (void *)vga_vram_base,
> @@ -155,6 +149,12 @@ static void vgacon_scrolldelta(struct vc_data *c, int lines)
>   	vga_set_mem_top(c);
>   }
>
> +static void vgacon_restore_screen(struct vc_data *c)
> +{
> +	if (c->vc_origin != c->vc_visible_origin)
> +		vgacon_scrolldelta(c, 0);
> +}
> +
>   static const char *vgacon_startup(void)
>   {
>   	const char *display_desc = NULL;