Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: fix kernel-doc for functions in tty.h

tty_kref_get() is already included in Documentation, but is not properly
formatted. Fix this.

tty_get_baud_rate() is neither properly formatted, nor is included. Fix
both.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230919085156.1578-10-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
71067fb7 3b1a696b

+12 -12
+3
Documentation/driver-api/tty/tty_ioctl.rst
··· 5 5 ================= 6 6 7 7 .. kernel-doc:: drivers/tty/tty_ioctl.c 8 + 9 + .. kernel-doc:: include/linux/tty.h 10 + :identifiers: tty_get_baud_rate
+9 -12
include/linux/tty.h
··· 390 390 extern const struct class tty_class; 391 391 392 392 /** 393 - * tty_kref_get - get a tty reference 394 - * @tty: tty device 393 + * tty_kref_get - get a tty reference 394 + * @tty: tty device 395 395 * 396 - * Return a new reference to a tty object. The caller must hold 397 - * sufficient locks/counts to ensure that their existing reference cannot 398 - * go away 396 + * Returns: a new reference to a tty object. The caller must hold sufficient 397 + * locks/counts to ensure that their existing reference cannot go away 399 398 */ 400 - 401 399 static inline struct tty_struct *tty_kref_get(struct tty_struct *tty) 402 400 { 403 401 if (tty) ··· 433 435 speed_t obaud); 434 436 435 437 /** 436 - * tty_get_baud_rate - get tty bit rates 437 - * @tty: tty to query 438 + * tty_get_baud_rate - get tty bit rates 439 + * @tty: tty to query 438 440 * 439 - * Returns the baud rate as an integer for this terminal. The 440 - * termios lock must be held by the caller and the terminal bit 441 - * flags may be updated. 441 + * Returns: the baud rate as an integer for this terminal. The termios lock 442 + * must be held by the caller and the terminal bit flags may be updated. 442 443 * 443 - * Locking: none 444 + * Locking: none 444 445 */ 445 446 static inline speed_t tty_get_baud_rate(struct tty_struct *tty) 446 447 {