lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <acdbb083-997f-b9ee-a4a8-3815c54f1f17@linux.intel.com>
Date:   Tue, 28 Nov 2023 12:20:19 +0200 (EET)
From:   Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To:     "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-serial <linux-serial@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/5] tty: make tty const in tty_get_baud_rate()

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@...nel.org>
> Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.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@...ux.intel.com>

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ