From 7a089ec7d77fe7d50f6bb7b178fa25eec9fd822b Mon Sep 17 00:00:00 2001 From: Peilin Ye Date: Thu, 12 Nov 2020 07:04:03 -0500 Subject: 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 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/c8d28007edf50de4387e1532eb3eb736db716f73.1605169912.git.yepeilin.cs@gmail.com --- drivers/usb/misc/sisusbvga/sisusb_con.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index c63e545fb105..fd9954381fbf 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -1358,11 +1358,6 @@ static int sisusbdummycon_font_default(struct vc_data *vc, return 0; } -static int sisusbdummycon_font_copy(struct vc_data *vc, int con) -{ - return 0; -} - static const struct consw sisusb_dummy_con = { .owner = THIS_MODULE, .con_startup = sisusbdummycon_startup, @@ -1377,7 +1372,6 @@ static const struct consw sisusb_dummy_con = { .con_blank = sisusbdummycon_blank, .con_font_set = sisusbdummycon_font_set, .con_font_default = sisusbdummycon_font_default, - .con_font_copy = sisusbdummycon_font_copy, }; int -- cgit v1.2.3 From 259a252c1f4e19045b06660f81014fb51e17f3f6 Mon Sep 17 00:00:00 2001 From: Peilin Ye Date: Thu, 12 Nov 2020 07:11:20 -0500 Subject: console: Delete dummy con_font_set() and con_font_default() callback implementations .con_font_set and .con_font_default callbacks should not pass `struct console_font *` as a parameter, since `struct console_font` is a UAPI structure. We are trying to let them use our new kernel font descriptor, `struct font_desc` instead. To make that work slightly easier, first delete all of their no-op implementations used by dummy consoles. This will make KD_FONT_OP_SET and KD_FONT_OP_SET_DEFAULT ioctl() requests on dummy consoles start to fail and return `-ENOSYS`, which is intended, since no user should ever expect such operations to succeed on dummy consoles. Suggested-by: Daniel Vetter Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/9952c7538d2a32bb1a82af323be482e7afb3dedf.1605169912.git.yepeilin.cs@gmail.com --- drivers/usb/misc/sisusbvga/sisusb_con.c | 15 --------------- drivers/video/console/dummycon.c | 14 -------------- 2 files changed, 29 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index fd9954381fbf..dfa0d5ce6012 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c @@ -1345,19 +1345,6 @@ static int sisusbdummycon_blank(struct vc_data *vc, int blank, int mode_switch) return 0; } -static int sisusbdummycon_font_set(struct vc_data *vc, - struct console_font *font, - unsigned int flags) -{ - return 0; -} - -static int sisusbdummycon_font_default(struct vc_data *vc, - struct console_font *font, char *name) -{ - return 0; -} - static const struct consw sisusb_dummy_con = { .owner = THIS_MODULE, .con_startup = sisusbdummycon_startup, @@ -1370,8 +1357,6 @@ static const struct consw sisusb_dummy_con = { .con_scroll = sisusbdummycon_scroll, .con_switch = sisusbdummycon_switch, .con_blank = sisusbdummycon_blank, - .con_font_set = sisusbdummycon_font_set, - .con_font_default = sisusbdummycon_font_default, }; int diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c index ab3df752fb57..f1711b2f9ff0 100644 --- a/drivers/video/console/dummycon.c +++ b/drivers/video/console/dummycon.c @@ -124,18 +124,6 @@ static int dummycon_switch(struct vc_data *vc) return 0; } -static int dummycon_font_set(struct vc_data *vc, struct console_font *font, - unsigned int flags) -{ - return 0; -} - -static int dummycon_font_default(struct vc_data *vc, - struct console_font *font, char *name) -{ - return 0; -} - /* * The console `switch' structure for the dummy console * @@ -154,7 +142,5 @@ const struct consw dummy_con = { .con_scroll = dummycon_scroll, .con_switch = dummycon_switch, .con_blank = dummycon_blank, - .con_font_set = dummycon_font_set, - .con_font_default = dummycon_font_default, }; EXPORT_SYMBOL_GPL(dummy_con); -- cgit v1.2.3