From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial <linux-serial@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] tty: make tty const in tty_get_baud_rate()
Date: Tue, 28 Nov 2023 12:20:19 +0200 (EET) [thread overview]
Message-ID: <acdbb083-997f-b9ee-a4a8-3815c54f1f17@linux.intel.com> (raw)
In-Reply-To: <20231127123713.14504-1-jirislaby@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
On Mon, 27 Nov 2023, Jiri Slaby (SUSE) wrote:
> After commit 87888fb9ac0c ("tty: Remove baudrate dead code & make
> ktermios params const"), the 'tty' parameter is only read in
> tty_get_baud_rate(). Therefore, we can make 'tty' accepted in the
> function 'const' for clarity.
>
> The "the terminal bit flags may be updated." part of the
> tty_get_baud_rate()'s kernel-doc is dropped as it is no longer true.
> Because of the same commit above. And it was misplaced anyway.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Cc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
> include/linux/tty.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/tty.h b/include/linux/tty.h
> index 7625fc98fef3..e96c85f4f91e 100644
> --- a/include/linux/tty.h
> +++ b/include/linux/tty.h
> @@ -440,10 +440,9 @@ void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud,
> *
> * Returns: the baud rate as an integer for this terminal
> *
> - * Locking: The termios lock must be held by the caller and the terminal bit
> - * flags may be updated.
> + * Locking: The termios lock must be held by the caller.
> */
> -static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
> +static inline speed_t tty_get_baud_rate(const struct tty_struct *tty)
> {
> return tty_termios_baud_rate(&tty->termios);
> }
Thanks,
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
prev parent reply other threads:[~2023-11-28 10:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 12:37 [PATCH 1/5] tty: make tty const in tty_get_baud_rate() Jiri Slaby (SUSE)
2023-11-27 12:37 ` [PATCH 2/5] tty: srmcons: make srmcons_do_write() return void Jiri Slaby (SUSE)
2023-11-28 13:25 ` Ilpo Järvinen
2023-11-27 12:37 ` [PATCH 3/5] tty: srmcons: use 'count' directly in srmcons_do_write() Jiri Slaby (SUSE)
2023-11-28 13:26 ` Ilpo Järvinen
2023-11-27 12:37 ` [PATCH 4/5] tty: srmcons: switch need_cr to bool Jiri Slaby (SUSE)
2023-11-28 13:25 ` Ilpo Järvinen
2023-11-27 12:37 ` [PATCH 5/5] tty: srmcons: remove 'str_cr' and use string directly Jiri Slaby (SUSE)
2023-11-28 13:26 ` Ilpo Järvinen
2023-11-28 10:20 ` Ilpo Järvinen [this message]
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=acdbb083-997f-b9ee-a4a8-3815c54f1f17@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/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