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

console: Delete unused con_font_copy() callback implementations

Recently in commit 3c4e0dff2095 ("vt: Disable KD_FONT_OP_COPY") we
disabled the KD_FONT_OP_COPY ioctl() option. Delete all the
con_font_copy() callbacks, since we no longer use them.

Mark KD_FONT_OP_COPY as "obsolete" in include/uapi/linux/kd.h, just like
what we have done for PPPIOCDETACH in commit af8d3c7c001a ("ppp: remove
the PPPIOCDETACH ioctl").

Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/c8d28007edf50de4387e1532eb3eb736db716f73.1605169912.git.yepeilin.cs@gmail.com

authored by

Peilin Ye and committed by
Daniel Vetter
7a089ec7 5bc5cc28

+1 -25
-6
drivers/usb/misc/sisusbvga/sisusb_con.c
··· 1358 1358 return 0; 1359 1359 } 1360 1360 1361 - static int sisusbdummycon_font_copy(struct vc_data *vc, int con) 1362 - { 1363 - return 0; 1364 - } 1365 - 1366 1361 static const struct consw sisusb_dummy_con = { 1367 1362 .owner = THIS_MODULE, 1368 1363 .con_startup = sisusbdummycon_startup, ··· 1372 1377 .con_blank = sisusbdummycon_blank, 1373 1378 .con_font_set = sisusbdummycon_font_set, 1374 1379 .con_font_default = sisusbdummycon_font_default, 1375 - .con_font_copy = sisusbdummycon_font_copy, 1376 1380 }; 1377 1381 1378 1382 int
-6
drivers/video/console/dummycon.c
··· 136 136 return 0; 137 137 } 138 138 139 - static int dummycon_font_copy(struct vc_data *vc, int con) 140 - { 141 - return 0; 142 - } 143 - 144 139 /* 145 140 * The console `switch' structure for the dummy console 146 141 * ··· 156 161 .con_blank = dummycon_blank, 157 162 .con_font_set = dummycon_font_set, 158 163 .con_font_default = dummycon_font_default, 159 - .con_font_copy = dummycon_font_copy, 160 164 }; 161 165 EXPORT_SYMBOL_GPL(dummy_con);
-11
drivers/video/fbdev/core/fbcon.c
··· 2451 2451 return 0; 2452 2452 } 2453 2453 2454 - static int fbcon_copy_font(struct vc_data *vc, int con) 2455 - { 2456 - struct fbcon_display *od = &fb_display[con]; 2457 - struct console_font *f = &vc->vc_font; 2458 - 2459 - if (od->fontdata == f->data) 2460 - return 0; /* already the same font... */ 2461 - return fbcon_do_set_font(vc, f->width, f->height, od->fontdata, od->userfont); 2462 - } 2463 - 2464 2454 /* 2465 2455 * User asked to set font; we are guaranteed that 2466 2456 * a) width and height are in range 1..32 ··· 3101 3111 .con_font_set = fbcon_set_font, 3102 3112 .con_font_get = fbcon_get_font, 3103 3113 .con_font_default = fbcon_set_def_font, 3104 - .con_font_copy = fbcon_copy_font, 3105 3114 .con_set_palette = fbcon_set_palette, 3106 3115 .con_invert_region = fbcon_invert_region, 3107 3116 .con_screen_pos = fbcon_screen_pos,
-1
include/linux/console.h
··· 62 62 int (*con_font_get)(struct vc_data *vc, struct console_font *font); 63 63 int (*con_font_default)(struct vc_data *vc, 64 64 struct console_font *font, char *name); 65 - int (*con_font_copy)(struct vc_data *vc, int con); 66 65 int (*con_resize)(struct vc_data *vc, unsigned int width, 67 66 unsigned int height, unsigned int user); 68 67 void (*con_set_palette)(struct vc_data *vc,
+1 -1
include/uapi/linux/kd.h
··· 173 173 #define KD_FONT_OP_SET 0 /* Set font */ 174 174 #define KD_FONT_OP_GET 1 /* Get font */ 175 175 #define KD_FONT_OP_SET_DEFAULT 2 /* Set font to default, data points to name / NULL */ 176 - #define KD_FONT_OP_COPY 3 /* Copy from another console */ 176 + #define KD_FONT_OP_COPY 3 /* Obsolete, do not use */ 177 177 178 178 #define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */ 179 179