From: Greg KH <gregkh@linuxfoundation.org>
To: Florian Eckert <fe@dev.tdt.de>
Cc: Eckert.Florian@googlemail.com, jirislaby@kernel.org,
pavel@ucw.cz, lee@kernel.org, kabel@kernel.org,
u.kleine-koenig@pengutronix.de, ansuelsmth@gmail.com,
m.brock@vanmierlo.com, linux-kernel@vger.kernel.org,
linux-serial@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v4 2/3] tty: add new helper function tty_get_tiocm
Date: Sat, 21 Oct 2023 18:15:23 +0200 [thread overview]
Message-ID: <2023102115-stock-scrambled-f7d5@gregkh> (raw)
In-Reply-To: <20231019112809.881730-3-fe@dev.tdt.de>
On Thu, Oct 19, 2023 at 01:28:08PM +0200, Florian Eckert wrote:
> The struct 'tty_struct' has a callback to read the status flags of the tty
> if the tty driver provides them. So fare, the data is transferred directly
> to userspace with the function 'tty_tiocmget'. This function cannot be
> used to evaluate the status line of the tty interface in the ledtrig-tty
> trigger. To make this possible, a new function must be added that does
> not immediately pass the data on to userspace.
>
> The new function 'tty_get_tiocm' only returns the status register.
> This information can then be processed further in the ledtrig-tty
> trigger.
Writing changelogs are hard. You are including a lot of information in
here that really doesn't need to be, as you are focusing on your
specific use case, which is fine, but you are creating a generic
function.
This can be simpler, how about something like this:
There is no in-kernel function to get the status register of a
tty device like the TIOCMGET ioctl returns to userspace. Create
a new function, tty_get_tiocm(), to obtain the status register
that other portions of the kernel can call if they need this
information, and move the existing internal tty_tiocmget()
function to use this interface.
Sound good?
The code portion looks fine to me, thanks for doing this.
greg k-h
next prev parent reply other threads:[~2023-10-21 16:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 11:28 [PATCH v4 0/3] ledtrig-tty: add additional tty state evaluation Florian Eckert
2023-10-19 11:28 ` [PATCH v4 1/3] tty: whitespaces in descriptions corrected by replacing tabs with spaces Florian Eckert
2023-10-21 16:08 ` Greg KH
2023-10-21 16:28 ` Greg KH
2023-10-22 10:24 ` Florian Eckert
2023-10-22 11:19 ` Greg KH
2023-10-19 11:28 ` [PATCH v4 2/3] tty: add new helper function tty_get_tiocm Florian Eckert
2023-10-21 16:15 ` Greg KH [this message]
2023-10-22 10:24 ` Florian Eckert
2023-10-19 11:28 ` [PATCH v4 3/3] leds: ledtrig-tty: add new line mode evaluation Florian Eckert
2023-10-21 16:07 ` Greg KH
2023-10-22 10:24 ` Florian Eckert
2023-10-22 11:24 ` Greg KH
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=2023102115-stock-scrambled-f7d5@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Eckert.Florian@googlemail.com \
--cc=ansuelsmth@gmail.com \
--cc=fe@dev.tdt.de \
--cc=jirislaby@kernel.org \
--cc=kabel@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=m.brock@vanmierlo.com \
--cc=pavel@ucw.cz \
--cc=u.kleine-koenig@pengutronix.de \
/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