Commit fa441954 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

tty: fix kernel-doc

With W=1, the kernel-doc checker complains quite a lot in the tty layer.
Over the time, many documented parameters were renamed, removed or
switched from tty to tty_port and similar. Some were mistyped in the doc
too.

So fix all these in the tty core. (But do not add the missing ones which
the checker complains about too. Not now.) The rest in the tty layer
will follow in the next patches.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200818085655.12071-4-jslaby@suse.czSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b07655c
...@@ -100,7 +100,7 @@ static void pty_unthrottle(struct tty_struct *tty) ...@@ -100,7 +100,7 @@ static void pty_unthrottle(struct tty_struct *tty)
* pty_write - write to a pty * pty_write - write to a pty
* @tty: the tty we write from * @tty: the tty we write from
* @buf: kernel buffer of data * @buf: kernel buffer of data
* @count: bytes to write * @c: bytes to write
* *
* Our "hardware" write method. Data is coming from the ldisc which * Our "hardware" write method. Data is coming from the ldisc which
* may be in a non sleeping state. We simply throw this at the other * may be in a non sleeping state. We simply throw this at the other
......
...@@ -119,8 +119,8 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate); ...@@ -119,8 +119,8 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
/** /**
* tty_termios_encode_baud_rate * tty_termios_encode_baud_rate
* @termios: ktermios structure holding user requested state * @termios: ktermios structure holding user requested state
* @ispeed: input speed * @ibaud: input speed
* @ospeed: output speed * @obaud: output speed
* *
* Encode the speeds set into the passed termios structure. This is * Encode the speeds set into the passed termios structure. This is
* used as a library helper for drivers so that they can report back * used as a library helper for drivers so that they can report back
...@@ -223,7 +223,7 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate); ...@@ -223,7 +223,7 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
/** /**
* tty_encode_baud_rate - set baud rate of the tty * tty_encode_baud_rate - set baud rate of the tty
* @ibaud: input baud rate * @ibaud: input baud rate
* @obad: output baud rate * @obaud: output baud rate
* *
* Update the current termios data for the tty with the new speed * Update the current termios data for the tty with the new speed
* settings. The caller must hold the termios_rwsem for the tty in * settings. The caller must hold the termios_rwsem for the tty in
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
* tty_buffer_lock_exclusive - gain exclusive access to buffer * tty_buffer_lock_exclusive - gain exclusive access to buffer
* tty_buffer_unlock_exclusive - release exclusive access * tty_buffer_unlock_exclusive - release exclusive access
* *
* @port - tty_port owning the flip buffer * @port: tty port owning the flip buffer
* *
* Guarantees safe use of the line discipline's receive_buf() method by * Guarantees safe use of the line discipline's receive_buf() method by
* excluding the buffer work and any pending flush from using the flip * excluding the buffer work and any pending flush from using the flip
...@@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(tty_buffer_unlock_exclusive); ...@@ -78,7 +78,7 @@ EXPORT_SYMBOL_GPL(tty_buffer_unlock_exclusive);
/** /**
* tty_buffer_space_avail - return unused buffer space * tty_buffer_space_avail - return unused buffer space
* @port - tty_port owning the flip buffer * @port: tty port owning the flip buffer
* *
* Returns the # of bytes which can be written by the driver without * Returns the # of bytes which can be written by the driver without
* reaching the buffer limit. * reaching the buffer limit.
...@@ -107,7 +107,7 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size) ...@@ -107,7 +107,7 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size)
/** /**
* tty_buffer_free_all - free buffers used by a tty * tty_buffer_free_all - free buffers used by a tty
* @tty: tty to free from * @port: tty port to free from
* *
* Remove all the buffers pending on a tty whether queued with data * Remove all the buffers pending on a tty whether queued with data
* or in the free ring. Must be called when the tty is no longer in use * or in the free ring. Must be called when the tty is no longer in use
...@@ -142,7 +142,7 @@ void tty_buffer_free_all(struct tty_port *port) ...@@ -142,7 +142,7 @@ void tty_buffer_free_all(struct tty_port *port)
/** /**
* tty_buffer_alloc - allocate a tty buffer * tty_buffer_alloc - allocate a tty buffer
* @tty: tty device * @port: tty port
* @size: desired size (characters) * @size: desired size (characters)
* *
* Allocate a new tty buffer to hold the desired number of characters. * Allocate a new tty buffer to hold the desired number of characters.
...@@ -184,7 +184,7 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size) ...@@ -184,7 +184,7 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
/** /**
* tty_buffer_free - free a tty buffer * tty_buffer_free - free a tty buffer
* @tty: tty owning the buffer * @port: tty port owning the buffer
* @b: the buffer to free * @b: the buffer to free
* *
* Free a tty buffer, or add it to the free list according to our * Free a tty buffer, or add it to the free list according to our
...@@ -243,7 +243,7 @@ void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld) ...@@ -243,7 +243,7 @@ void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
/** /**
* tty_buffer_request_room - grow tty buffer if needed * tty_buffer_request_room - grow tty buffer if needed
* @tty: tty structure * @port: tty port
* @size: size desired * @size: size desired
* @flags: buffer flags if new buffer allocated (default = 0) * @flags: buffer flags if new buffer allocated (default = 0)
* *
...@@ -559,7 +559,7 @@ EXPORT_SYMBOL(tty_flip_buffer_push); ...@@ -559,7 +559,7 @@ EXPORT_SYMBOL(tty_flip_buffer_push);
/** /**
* tty_buffer_init - prepare a tty buffer structure * tty_buffer_init - prepare a tty buffer structure
* @tty: tty to initialise * @port: tty port to initialise
* *
* Set up the initial state of the buffer management for a tty device. * Set up the initial state of the buffer management for a tty device.
* Must be called before the other tty buffer functions are used. * Must be called before the other tty buffer functions are used.
......
...@@ -307,7 +307,7 @@ static int check_tty_count(struct tty_struct *tty, const char *routine) ...@@ -307,7 +307,7 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
/** /**
* get_tty_driver - find device of a tty * get_tty_driver - find device of a tty
* @dev_t: device identifier * @device: device identifier
* @index: returns the index of the tty * @index: returns the index of the tty
* *
* This routine returns a tty driver structure, given a device number * This routine returns a tty driver structure, given a device number
...@@ -544,7 +544,7 @@ EXPORT_SYMBOL_GPL(tty_wakeup); ...@@ -544,7 +544,7 @@ EXPORT_SYMBOL_GPL(tty_wakeup);
/** /**
* __tty_hangup - actual handler for hangup events * __tty_hangup - actual handler for hangup events
* @work: tty device * @tty: tty device
* *
* This can be called by a "kworker" kernel thread. That is process * This can be called by a "kworker" kernel thread. That is process
* synchronous but doesn't hold any locks, so we need to make sure we * synchronous but doesn't hold any locks, so we need to make sure we
...@@ -1232,7 +1232,7 @@ static int tty_driver_install_tty(struct tty_driver *driver, ...@@ -1232,7 +1232,7 @@ static int tty_driver_install_tty(struct tty_driver *driver,
/** /**
* tty_driver_remove_tty() - remove a tty from the driver tables * tty_driver_remove_tty() - remove a tty from the driver tables
* @driver: the driver for the tty * @driver: the driver for the tty
* @idx: the minor number * @tty: tty to remove
* *
* Remvoe a tty object from the driver tables. The tty->index field * Remvoe a tty object from the driver tables. The tty->index field
* will be set by the time this is called. * will be set by the time this is called.
...@@ -1247,9 +1247,9 @@ static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct * ...@@ -1247,9 +1247,9 @@ static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *
driver->ttys[tty->index] = NULL; driver->ttys[tty->index] = NULL;
} }
/* /**
* tty_reopen() - fast re-open of an open tty * tty_reopen() - fast re-open of an open tty
* @tty - the tty to open * @tty: the tty to open
* *
* Return 0 on success, -errno on error. * Return 0 on success, -errno on error.
* Re-opens on master ptys are not allowed and return -EIO. * Re-opens on master ptys are not allowed and return -EIO.
...@@ -1295,7 +1295,6 @@ static int tty_reopen(struct tty_struct *tty) ...@@ -1295,7 +1295,6 @@ static int tty_reopen(struct tty_struct *tty)
* tty_init_dev - initialise a tty device * tty_init_dev - initialise a tty device
* @driver: tty driver we are opening a device on * @driver: tty driver we are opening a device on
* @idx: device index * @idx: device index
* @ret_tty: returned tty structure
* *
* Prepare a tty device. This may not be a "new" clean device but * Prepare a tty device. This may not be a "new" clean device but
* could also be an active device. The pty drivers require special * could also be an active device. The pty drivers require special
...@@ -1313,6 +1312,8 @@ static int tty_reopen(struct tty_struct *tty) ...@@ -1313,6 +1312,8 @@ static int tty_reopen(struct tty_struct *tty)
* failed open. The new code protects the open with a mutex, so it's * failed open. The new code protects the open with a mutex, so it's
* really quite straightforward. The mutex locking can probably be * really quite straightforward. The mutex locking can probably be
* relaxed for the (most common) case of reopening a tty. * relaxed for the (most common) case of reopening a tty.
*
* Return: returned tty structure
*/ */
struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx) struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
...@@ -1432,7 +1433,7 @@ static void tty_flush_works(struct tty_struct *tty) ...@@ -1432,7 +1433,7 @@ static void tty_flush_works(struct tty_struct *tty)
/** /**
* release_one_tty - release tty structure memory * release_one_tty - release tty structure memory
* @kref: kref of tty we are obliterating * @work: work of tty we are obliterating
* *
* Releases memory associated with a tty structure, and clears out the * Releases memory associated with a tty structure, and clears out the
* driver table slots. This function is called when a device is no longer * driver table slots. This function is called when a device is no longer
...@@ -1528,7 +1529,6 @@ static void release_tty(struct tty_struct *tty, int idx) ...@@ -1528,7 +1529,6 @@ static void release_tty(struct tty_struct *tty, int idx)
/** /**
* tty_release_checks - check a tty before real release * tty_release_checks - check a tty before real release
* @tty: tty to check * @tty: tty to check
* @o_tty: link of @tty (if any)
* @idx: index of the tty * @idx: index of the tty
* *
* Performs some paranoid checking before true release of the @tty. * Performs some paranoid checking before true release of the @tty.
...@@ -2200,7 +2200,7 @@ static int tiocsti(struct tty_struct *tty, char __user *p) ...@@ -2200,7 +2200,7 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
/** /**
* tiocgwinsz - implement window query ioctl * tiocgwinsz - implement window query ioctl
* @tty; tty * @tty: tty
* @arg: user buffer for result * @arg: user buffer for result
* *
* Copies the kernel idea of the window size into the user buffer. * Copies the kernel idea of the window size into the user buffer.
...@@ -2223,8 +2223,7 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg) ...@@ -2223,8 +2223,7 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
/** /**
* tty_do_resize - resize event * tty_do_resize - resize event
* @tty: tty being resized * @tty: tty being resized
* @rows: rows (character) * @ws: new dimensions
* @cols: cols (character)
* *
* Update the termios variables and send the necessary signals to * Update the termios variables and send the necessary signals to
* peform a terminal resize correctly * peform a terminal resize correctly
...@@ -2254,7 +2253,7 @@ EXPORT_SYMBOL(tty_do_resize); ...@@ -2254,7 +2253,7 @@ EXPORT_SYMBOL(tty_do_resize);
/** /**
* tiocswinsz - implement window size set ioctl * tiocswinsz - implement window size set ioctl
* @tty; tty side of tty * @tty: tty side of tty
* @arg: user buffer for result * @arg: user buffer for result
* *
* Copies the user idea of the window size to the kernel. Traditionally * Copies the user idea of the window size to the kernel. Traditionally
...@@ -2402,7 +2401,6 @@ static int send_break(struct tty_struct *tty, unsigned int duration) ...@@ -2402,7 +2401,6 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
/** /**
* tty_tiocmget - get modem status * tty_tiocmget - get modem status
* @tty: tty device * @tty: tty device
* @file: user file pointer
* @p: pointer to result * @p: pointer to result
* *
* Obtain the modem status bits from the tty driver if the feature * Obtain the modem status bits from the tty driver if the feature
......
...@@ -178,8 +178,8 @@ void session_clear_tty(struct pid *session) ...@@ -178,8 +178,8 @@ void session_clear_tty(struct pid *session)
/** /**
* tty_signal_session_leader - sends SIGHUP to session leader * tty_signal_session_leader - sends SIGHUP to session leader
* @tty controlling tty * @tty: controlling tty
* @exit_session if non-zero, signal all foreground group processes * @exit_session: if non-zero, signal all foreground group processes
* *
* Send SIGHUP and SIGCONT to the session leader and its process group. * Send SIGHUP and SIGCONT to the session leader and its process group.
* Optionally, signal all processes in the foreground process group. * Optionally, signal all processes in the foreground process group.
......
...@@ -79,7 +79,6 @@ EXPORT_SYMBOL(tty_register_ldisc); ...@@ -79,7 +79,6 @@ EXPORT_SYMBOL(tty_register_ldisc);
/** /**
* tty_unregister_ldisc - unload a line discipline * tty_unregister_ldisc - unload a line discipline
* @disc: ldisc number * @disc: ldisc number
* @new_ldisc: pointer to the ldisc object
* *
* Remove a line discipline from the kernel providing it is not * Remove a line discipline from the kernel providing it is not
* currently in use. * currently in use.
...@@ -542,7 +541,7 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old) ...@@ -542,7 +541,7 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
/** /**
* tty_set_ldisc - set line discipline * tty_set_ldisc - set line discipline
* @tty: the terminal to set * @tty: the terminal to set
* @ldisc: the line discipline * @disc: the line discipline number
* *
* Set the discipline of a tty line. Must be called from a process * Set the discipline of a tty line. Must be called from a process
* context. The ldisc change logic has to protect itself against any * context. The ldisc change logic has to protect itself against any
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment