From: Jiri Slaby (SUSE) Date: Mon, 22 Jan 2024 11:03:38 +0000 (+0100) Subject: tty: vt: eliminate unneeded consw::con_putc() implementations X-Git-Tag: microblaze-v6.10~39^2~171 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=8bc03a30093024c68f10fb9033ca28f925074c52;p=linux-2.6-microblaze.git tty: vt: eliminate unneeded consw::con_putc() implementations All these consw::con_putc() implementations do the same as consw::con_putcs() (only for one charattr) or even call consw::con_putcs() on their own. Drop them, as thanks to the new con_putc() helper in the previous patch, the console code performs this already -- exactly if consw::con_putc() is missing (NULL). Signed-off-by: "Jiri Slaby (SUSE)" Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Daniel Vetter Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-parisc@vger.kernel.org Tested-by: Helge Deller # parisc STI console Link: https://lore.kernel.org/r/20240122110401.7289-25-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/video/console/mdacon.c b/drivers/video/console/mdacon.c index 2ff2c9394d40..01e779943c00 100644 --- a/drivers/video/console/mdacon.c +++ b/drivers/video/console/mdacon.c @@ -427,11 +427,6 @@ static inline u16 *mda_addr(unsigned int x, unsigned int y) return mda_vram_base + y * mda_num_columns + x; } -static void mdacon_putc(struct vc_data *c, int ch, int y, int x) -{ - scr_writew(mda_convert_attr(ch), mda_addr(x, y)); -} - static void mdacon_putcs(struct vc_data *c, const unsigned short *s, int count, int y, int x) { @@ -536,7 +531,6 @@ static const struct consw mda_con = { .con_init = mdacon_init, .con_deinit = mdacon_deinit, .con_clear = mdacon_clear, - .con_putc = mdacon_putc, .con_putcs = mdacon_putcs, .con_cursor = mdacon_cursor, .con_scroll = mdacon_scroll, diff --git a/drivers/video/console/sticon.c b/drivers/video/console/sticon.c index b1d972d9a31c..2f87b5909d0d 100644 --- a/drivers/video/console/sticon.c +++ b/drivers/video/console/sticon.c @@ -71,17 +71,6 @@ static const char *sticon_startup(void) return "STI console"; } -static void sticon_putc(struct vc_data *conp, int c, int ypos, int xpos) -{ - if (vga_is_gfx || console_blanked) - return; - - if (conp->vc_mode != KD_TEXT) - return; - - sti_putc(sticon_sti, c, ypos, xpos, font_data[conp->vc_num]); -} - static void sticon_putcs(struct vc_data *conp, const unsigned short *s, int count, int ypos, int xpos) { @@ -362,7 +351,6 @@ static const struct consw sti_con = { .con_init = sticon_init, .con_deinit = sticon_deinit, .con_clear = sticon_clear, - .con_putc = sticon_putc, .con_putcs = sticon_putcs, .con_cursor = sticon_cursor, .con_scroll = sticon_scroll, diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 85f29dec2c3d..4beab11f87eb 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1193,7 +1193,6 @@ static bool vgacon_scroll(struct vc_data *c, unsigned int t, unsigned int b, static void vgacon_clear(struct vc_data *vc, unsigned int sy, unsigned int sx, unsigned int width) { } -static void vgacon_putc(struct vc_data *vc, int c, int ypos, int xpos) { } static void vgacon_putcs(struct vc_data *vc, const unsigned short *s, int count, int ypos, int xpos) { } @@ -1203,7 +1202,6 @@ const struct consw vga_con = { .con_init = vgacon_init, .con_deinit = vgacon_deinit, .con_clear = vgacon_clear, - .con_putc = vgacon_putc, .con_putcs = vgacon_putcs, .con_cursor = vgacon_cursor, .con_scroll = vgacon_scroll, diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 8a31a36483ea..38de0f8723aa 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -1292,14 +1292,6 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, get_color(vc, info, scr_readw(s), 0)); } -static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) -{ - unsigned short chr; - - scr_writew(c, &chr); - fbcon_putcs(vc, &chr, 1, ypos, xpos); -} - static void fbcon_clear_margins(struct vc_data *vc, int bottom_only) { struct fb_info *info = fbcon_info_from_console(vc->vc_num); @@ -3159,7 +3151,6 @@ static const struct consw fb_con = { .con_init = fbcon_init, .con_deinit = fbcon_deinit, .con_clear = fbcon_clear, - .con_putc = fbcon_putc, .con_putcs = fbcon_putcs, .con_cursor = fbcon_cursor, .con_scroll = fbcon_scroll,