Thread (3 messages) 3 messages, 2 authors, 2025-06-23

Re: [PATCH 01/33] tty: introduce and use tty_port_tty_vhangup() helper

From: Jiri Slaby <jirislaby@kernel.org>
Date: 2025-06-23 07:30:39
Also in: linux-bluetooth, linux-serial, linux-staging, linux-usb, lkml

On 11. 06. 25, 13:13, Ilpo Järvinen wrote:
On Wed, 11 Jun 2025, Jiri Slaby (SUSE) wrote:
quoted
This code (tty_get -> vhangup -> tty_put) is repeated on few places.
Introduce a helper similar to tty_port_tty_hangup() (asynchronous) to
handle even vhangup (synchronous).

And use it on those places.

In fact, reuse the tty_port_tty_hangup()'s code and call tty_vhangup()
depending on a new bool parameter.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Cc: Karsten Keil <redacted>
Cc: David Lin <dtwlin@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Alex Elder <elder@kernel.org>
Cc: Oliver Neukum <oneukum@suse.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Johan Hedberg <redacted>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Nice cleanup. I'm not sure if it's important enough to be mentioned in
Documentation/driver-api/tty/tty_port.rst .
At minimum I broke tty_port_tty_hangup()'s kernel-doc:
/**
  * tty_port_tty_hangup - helper to hang up a tty
  * @port: tty port
  * @check_clocal: hang only ttys with %CLOCAL unset?
  */
  void __tty_port_tty_hangup(struct tty_port *port, bool check_clocal, 
bool async)


doc says tty_port_tty_hangup(), code says __tty_port_tty_hangup(). Fix 
coming, incl. vhangup addition.

thanks,
-- 
js
suse labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help