From: Daniel Vetter <daniel@ffwll.ch> To: Jiri Slaby <jirislaby@kernel.org> Cc: Peilin Ye <yepeilin.cs@gmail.com>, Daniel Vetter <daniel.vetter@ffwll.ch>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thomas Winischhofer <thomas@winischhofer.net>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Nicolas Pitre <nico@fluxnic.net>, "Gustavo A . R . Silva" <gustavoars@kernel.org>, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>, George Kennedy <george.kennedy@oracle.com>, Nathan Chancellor <natechancellor@gmail.com>, Peter Rosin <peda@axentia.se>, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH v2 1/2] console: Remove dummy con_font_op() callback implementations Date: Mon, 2 Nov 2020 11:13:47 +0100 [thread overview] Message-ID: <20201102101347.GN401619@phenom.ffwll.local> (raw) In-Reply-To: <a8157089-bc72-c409-c7cc-2fd7eb087ebc@kernel.org> On Mon, Nov 02, 2020 at 10:47:55AM +0100, Jiri Slaby wrote: > On 02. 11. 20, 10:36, Peilin Ye wrote: > > `struct console_font` is a UAPI structure, thus ideally should not be > > used for kernel internal abstraction. Remove some dummy .con_font_set, > > .con_font_default and .con_font_copy `struct consw` callback > > implementations, to make it cleaner. > > ESEMANTIC_ERROR. > > 1) What do you refer to with the last "it"? > > 2) What's the purpose of mentioning struct console_font at all? > > 3) Could you clarify whether you checked it is safe to remove the hooks? > > 4) All the hooks now return ENOSYS for both consoles (and not 0). Is this > intentional? > > I know answers to the first 3 questions, but you need to elaborate a bit in > the commit log to connect those sentences. Esp. for people not dealing with > the code on a daily basis. Ad 4) I am not sure. Yup the behaviour change from 4) needs to be called out. I think this should then also be done as part of the large patch series to remove the dummy functions from all console drivers. I don't expect the errno change to cause trouble, and it's the more honest errno - changing fonts not supported is the truth. But if it is, we can patch that up appropriately when we get a regression report. That's kinda unavoidable with old crufty uapi like this one here. Also a bikeshed: Additional information like the patch changelog or reasons why you do something is imo best to include in the commit message itself. It ends up looking a bit less tidy sometimes, but often there's crucial information in these parts that was accidentally left out from the commit message. Thanks, Daniel > > > Suggested-by: Daniel Vetter <daniel@ffwll.ch> > > Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com> > > --- > > Change in v2: > > - [v2 2/2] no longer Cc: stable, so do not Cc: stable > > > > Context: https://lore.kernel.org/lkml/CAKMK7uFY2zv0adjKJ_ORVFT7Zzwn075MaU0rEU7_FuqENLR=UA@mail.gmail.com/ > > > > drivers/usb/misc/sisusbvga/sisusb_con.c | 21 --------------------- > > drivers/video/console/dummycon.c | 20 -------------------- > > 2 files changed, 41 deletions(-) > > > > diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c > > index c63e545fb105..dfa0d5ce6012 100644 > > --- a/drivers/usb/misc/sisusbvga/sisusb_con.c > > +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c > > @@ -1345,24 +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 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, > > @@ -1375,9 +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, > > - .con_font_copy = sisusbdummycon_font_copy, > > }; > > int > > diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c > > index 2a0d0bda7faa..f1711b2f9ff0 100644 > > --- a/drivers/video/console/dummycon.c > > +++ b/drivers/video/console/dummycon.c > > @@ -124,23 +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; > > -} > > - > > -static int dummycon_font_copy(struct vc_data *vc, int con) > > -{ > > - return 0; > > -} > > - > > /* > > * The console `switch' structure for the dummy console > > * > > @@ -159,8 +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, > > - .con_font_copy = dummycon_font_copy, > > }; > > EXPORT_SYMBOL_GPL(dummy_con); > > > > > -- > js > suse labs -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch> To: Jiri Slaby <jirislaby@kernel.org> Cc: linux-fbdev@vger.kernel.org, linux-usb@vger.kernel.org, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>, Daniel Vetter <daniel.vetter@ffwll.ch>, Thomas Winischhofer <thomas@winischhofer.net>, "Gustavo A . R . Silva" <gustavoars@kernel.org>, dri-devel@lists.freedesktop.org, Nicolas Pitre <nico@fluxnic.net>, George Kennedy <george.kennedy@oracle.com>, Peter Rosin <peda@axentia.se>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Nathan Chancellor <natechancellor@gmail.com>, Peilin Ye <yepeilin.cs@gmail.com>, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] console: Remove dummy con_font_op() callback implementations Date: Mon, 2 Nov 2020 11:13:47 +0100 [thread overview] Message-ID: <20201102101347.GN401619@phenom.ffwll.local> (raw) In-Reply-To: <a8157089-bc72-c409-c7cc-2fd7eb087ebc@kernel.org> On Mon, Nov 02, 2020 at 10:47:55AM +0100, Jiri Slaby wrote: > On 02. 11. 20, 10:36, Peilin Ye wrote: > > `struct console_font` is a UAPI structure, thus ideally should not be > > used for kernel internal abstraction. Remove some dummy .con_font_set, > > .con_font_default and .con_font_copy `struct consw` callback > > implementations, to make it cleaner. > > ESEMANTIC_ERROR. > > 1) What do you refer to with the last "it"? > > 2) What's the purpose of mentioning struct console_font at all? > > 3) Could you clarify whether you checked it is safe to remove the hooks? > > 4) All the hooks now return ENOSYS for both consoles (and not 0). Is this > intentional? > > I know answers to the first 3 questions, but you need to elaborate a bit in > the commit log to connect those sentences. Esp. for people not dealing with > the code on a daily basis. Ad 4) I am not sure. Yup the behaviour change from 4) needs to be called out. I think this should then also be done as part of the large patch series to remove the dummy functions from all console drivers. I don't expect the errno change to cause trouble, and it's the more honest errno - changing fonts not supported is the truth. But if it is, we can patch that up appropriately when we get a regression report. That's kinda unavoidable with old crufty uapi like this one here. Also a bikeshed: Additional information like the patch changelog or reasons why you do something is imo best to include in the commit message itself. It ends up looking a bit less tidy sometimes, but often there's crucial information in these parts that was accidentally left out from the commit message. Thanks, Daniel > > > Suggested-by: Daniel Vetter <daniel@ffwll.ch> > > Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com> > > --- > > Change in v2: > > - [v2 2/2] no longer Cc: stable, so do not Cc: stable > > > > Context: https://lore.kernel.org/lkml/CAKMK7uFY2zv0adjKJ_ORVFT7Zzwn075MaU0rEU7_FuqENLR=UA@mail.gmail.com/ > > > > drivers/usb/misc/sisusbvga/sisusb_con.c | 21 --------------------- > > drivers/video/console/dummycon.c | 20 -------------------- > > 2 files changed, 41 deletions(-) > > > > diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c > > index c63e545fb105..dfa0d5ce6012 100644 > > --- a/drivers/usb/misc/sisusbvga/sisusb_con.c > > +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c > > @@ -1345,24 +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 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, > > @@ -1375,9 +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, > > - .con_font_copy = sisusbdummycon_font_copy, > > }; > > int > > diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c > > index 2a0d0bda7faa..f1711b2f9ff0 100644 > > --- a/drivers/video/console/dummycon.c > > +++ b/drivers/video/console/dummycon.c > > @@ -124,23 +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; > > -} > > - > > -static int dummycon_font_copy(struct vc_data *vc, int con) > > -{ > > - return 0; > > -} > > - > > /* > > * The console `switch' structure for the dummy console > > * > > @@ -159,8 +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, > > - .con_font_copy = dummycon_font_copy, > > }; > > EXPORT_SYMBOL_GPL(dummy_con); > > > > > -- > js > suse labs -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-11-02 10:13 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-31 7:24 [PATCH 1/2] console: Remove dummy con_font_op() callback implementations Peilin Ye 2020-10-31 7:24 ` Peilin Ye 2020-10-31 7:27 ` [PATCH 2/2] fbcon: Prevent global-out-of-bounds read in fbcon_copy_font() Peilin Ye 2020-10-31 7:27 ` Peilin Ye 2020-11-02 2:51 ` kernel test robot 2020-11-02 9:36 ` [PATCH v2 1/2] console: Remove dummy con_font_op() callback implementations Peilin Ye 2020-11-02 9:36 ` Peilin Ye 2020-11-02 9:37 ` [PATCH v2 2/2] tty/vt: Avoid passing struct console_font_op to con_font_copy() Peilin Ye 2020-11-02 9:37 ` Peilin Ye 2020-11-02 10:10 ` Daniel Vetter 2020-11-02 10:10 ` Daniel Vetter 2020-11-02 11:12 ` Peilin Ye 2020-11-02 11:12 ` Peilin Ye 2020-11-02 11:30 ` Daniel Vetter 2020-11-02 11:30 ` Daniel Vetter 2020-11-02 9:47 ` [PATCH v2 1/2] console: Remove dummy con_font_op() callback implementations Jiri Slaby 2020-11-02 9:47 ` Jiri Slaby 2020-11-02 10:13 ` Daniel Vetter [this message] 2020-11-02 10:13 ` Daniel Vetter 2020-11-02 10:52 ` Peilin Ye 2020-11-02 10:52 ` Peilin Ye 2020-11-06 10:50 ` [PATCH " Greg Kroah-Hartman 2020-11-06 10:50 ` Greg Kroah-Hartman 2020-11-10 12:49 ` Daniel Vetter 2020-11-10 12:49 ` Daniel Vetter 2020-11-10 13:24 ` Peilin Ye 2020-11-10 13:24 ` Peilin Ye 2020-11-10 13:46 ` Daniel Vetter 2020-11-10 13:46 ` Daniel Vetter 2020-11-10 13:55 ` Peilin Ye 2020-11-10 13:55 ` Peilin Ye 2020-11-10 14:56 ` Greg Kroah-Hartman 2020-11-10 14:56 ` Greg Kroah-Hartman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201102101347.GN401619@phenom.ffwll.local \ --to=daniel@ffwll.ch \ --cc=b.zolnierkie@samsung.com \ --cc=daniel.vetter@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=george.kennedy@oracle.com \ --cc=gregkh@linuxfoundation.org \ --cc=gustavoars@kernel.org \ --cc=jirislaby@kernel.org \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-usb@vger.kernel.org \ --cc=natechancellor@gmail.com \ --cc=nico@fluxnic.net \ --cc=peda@axentia.se \ --cc=penguin-kernel@i-love.sakura.ne.jp \ --cc=thomas@winischhofer.net \ --cc=yepeilin.cs@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.