From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH 00/13] tty.h cleanups
Date: Thu, 15 Apr 2021 10:21:54 +0200 [thread overview]
Message-ID: <YHf3ojj44ex2dd3M@kroah.com> (raw)
In-Reply-To: <YHADHYKMhfYE1aNw@hovoldconsulting.com>
On Fri, Apr 09, 2021 at 09:32:45AM +0200, Johan Hovold wrote:
> On Thu, Apr 08, 2021 at 08:01:08PM +0200, Greg Kroah-Hartman wrote:
> > On Thu, Apr 08, 2021 at 04:25:22PM +0200, Johan Hovold wrote:
> > > On Thu, Apr 08, 2021 at 02:51:21PM +0200, Greg Kroah-Hartman wrote:
> > > > Turns out there is a lot of tty-internal stuff in include/linux/tty.h
> > > > that do not belong there. Create a internal-to-the-tty-layer .h file
> > > > for these types of things and move function prototypes to it instead of
> > > > being in the system-wide header file.
> > > >
> > > > Along the way clean up the use of some old tty-only debugging macros and
> > > > use the in-kernel dev_*() calls instead.
> > >
> > > I'm afraid that's not a good idea since not all ttys have a
> > > corresponding class device. Notable exception include pseudo terminals
> > > and serdev.
> > >
> > > While dev_printk() can handle a NULL device argument without crashing,
> > > we'll actually lose log information by removing the tty printk helpers.
> >
> > I think the same info will be printed here as before, just some NULL
> > information at the beginning, right? And the benifits overall (for real
> > tty devices), should outweigh the few devices that do not have this
> > information.
>
> No, you'll only be losing information (tty driver and tty name). Here's
> a pty example, where the first line in each pair use dev_info() and the
> second tty_info():
>
> [ 10.235331] (NULL device *): tty_get_device
> [ 10.235441] ptm ptm0: tty_get_device
>
> [ 10.235586] (NULL device *): tty_get_device
> [ 10.235674] pts pts0: tty_get_device
>
> and similar for serdev, which is becoming more and more common.
Ok, good point, I'll go apply only the first 2 patches in this series
(moving the macros out of tty.h and removing the unused one) and then
will redo this set of patches again. I think a better tty_msg() macro
is warrented so that we can provide dev_*() output if we have a device,
otherwise fall back to the old style to preserve functionality.
thanks,
greg k-h
next prev parent reply other threads:[~2021-04-15 8:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 12:51 [PATCH 00/13] tty.h cleanups Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 01/13] tty: create internal tty.h file Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 02/13] tty: tty.h: remove tty_info() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 03/13] tty: remove tty_err() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 04/13] tty: remove tty_notice() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 05/13] tty: remove tty_warn() Greg Kroah-Hartman
2021-04-08 13:47 ` Tetsuo Handa
2021-04-08 18:03 ` Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 06/13] tty: remove tty_info_ratelimited() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 07/13] tty: remove tty_debug() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 08/13] tty: audit: move some local functions out of tty.h Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 09/13] tty: move some internal tty lock enums and " Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 10/13] tty: make tty_release_redirect() static Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 11/13] tty: move some tty-only functions to drivers/tty/tty.h Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 12/13] tty: remove tty_driver_name() Greg Kroah-Hartman
2021-04-08 12:51 ` [PATCH 13/13] tty: clean include/linux/tty.h up Greg Kroah-Hartman
2021-04-08 17:51 ` Greg Kroah-Hartman
2021-04-08 14:25 ` [PATCH 00/13] tty.h cleanups Johan Hovold
2021-04-08 18:01 ` Greg Kroah-Hartman
2021-04-09 7:32 ` Johan Hovold
2021-04-15 8:21 ` Greg Kroah-Hartman [this message]
2021-04-15 14:14 ` Johan Hovold
2021-04-15 14:53 ` 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=YHf3ojj44ex2dd3M@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox