Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tty: vt: make font of consw::con_font_set() const

Provided the font parameter of consw::con_font_set() is not supposed to
be changed, make it const.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linux-parisc@vger.kernel.org
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-37-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
fd0f631f 77e11093

+11 -9
+1 -1
drivers/tty/vt/vt.c
··· 4625 4625 return rc; 4626 4626 } 4627 4627 4628 - static int con_font_set(struct vc_data *vc, struct console_font_op *op) 4628 + static int con_font_set(struct vc_data *vc, const struct console_font_op *op) 4629 4629 { 4630 4630 struct console_font font; 4631 4631 int rc = -EINVAL;
+3 -2
drivers/video/console/newport_con.c
··· 496 496 return true; 497 497 } 498 498 499 - static int newport_set_font(int unit, struct console_font *op, unsigned int vpitch) 499 + static int newport_set_font(int unit, const struct console_font *op, 500 + unsigned int vpitch) 500 501 { 501 502 int w = op->width; 502 503 int h = op->height; ··· 569 568 return newport_set_def_font(vc->vc_num, op); 570 569 } 571 570 572 - static int newport_font_set(struct vc_data *vc, struct console_font *font, 571 + static int newport_font_set(struct vc_data *vc, const struct console_font *font, 573 572 unsigned int vpitch, unsigned int flags) 574 573 { 575 574 return newport_set_font(vc->vc_num, font, vpitch);
+2 -2
drivers/video/console/sticon.c
··· 153 153 } 154 154 } 155 155 156 - static int sticon_set_font(struct vc_data *vc, struct console_font *op, 156 + static int sticon_set_font(struct vc_data *vc, const struct console_font *op, 157 157 unsigned int vpitch) 158 158 { 159 159 struct sti_struct *sti = sticon_sti; ··· 253 253 return 0; 254 254 } 255 255 256 - static int sticon_font_set(struct vc_data *vc, struct console_font *font, 256 + static int sticon_font_set(struct vc_data *vc, const struct console_font *font, 257 257 unsigned int vpitch, unsigned int flags) 258 258 { 259 259 return sticon_set_font(vc, font, vpitch);
+1 -1
drivers/video/console/vgacon.c
··· 1039 1039 return 0; 1040 1040 } 1041 1041 1042 - static int vgacon_font_set(struct vc_data *c, struct console_font *font, 1042 + static int vgacon_font_set(struct vc_data *c, const struct console_font *font, 1043 1043 unsigned int vpitch, unsigned int flags) 1044 1044 { 1045 1045 unsigned charcount = font->charcount;
+1 -1
drivers/video/fbdev/core/fbcon.c
··· 2460 2460 * but lets not assume that, since charcount of 512 is small for unicode support. 2461 2461 */ 2462 2462 2463 - static int fbcon_set_font(struct vc_data *vc, struct console_font *font, 2463 + static int fbcon_set_font(struct vc_data *vc, const struct console_font *font, 2464 2464 unsigned int vpitch, unsigned int flags) 2465 2465 { 2466 2466 struct fb_info *info = fbcon_info_from_console(vc->vc_num);
+3 -2
include/linux/console.h
··· 75 75 bool (*con_switch)(struct vc_data *vc); 76 76 bool (*con_blank)(struct vc_data *vc, enum vesa_blank_mode blank, 77 77 bool mode_switch); 78 - int (*con_font_set)(struct vc_data *vc, struct console_font *font, 79 - unsigned int vpitch, unsigned int flags); 78 + int (*con_font_set)(struct vc_data *vc, 79 + const struct console_font *font, 80 + unsigned int vpitch, unsigned int flags); 80 81 int (*con_font_get)(struct vc_data *vc, struct console_font *font, 81 82 unsigned int vpitch); 82 83 int (*con_font_default)(struct vc_data *vc,