diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-11-26 09:16:03 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-26 16:27:43 +0100 |
commit | c66453ce8af8bac78a72ba4e21fd9a86720127d7 (patch) | |
tree | e654132190230d907ea02ed9d4bafdb8e6ff6d98 /drivers/tty/n_tty.c | |
parent | tty: reformat kernel-doc in tty_buffer.c (diff) | |
download | linux-c66453ce8af8bac78a72ba4e21fd9a86720127d7.tar.xz linux-c66453ce8af8bac78a72ba4e21fd9a86720127d7.zip |
tty: fix kernel-doc in n_tty.c
* process_echoes doc was a misnomer
* isig and n_tty_receive_char docs were misplaced
* n_tty_read parameters were incorrect (from pre-cookie times)
So fix all the warnings at once:
624: warning: expecting prototype for process_echoes(). Prototype was for __process_echoes() instead
1110: warning: expecting prototype for isig(). Prototype was for __isig() instead
1264: warning: expecting prototype for n_tty_receive_char(). Prototype was for n_tty_receive_char_special() instead
2067: warning: Excess function parameter 'buf' description in 'n_tty_read'
624: warning: expecting prototype for process_echoes(). Prototype was for __process_echoes() instead
1110: warning: expecting prototype for isig(). Prototype was for __isig() instead
1264: warning: expecting prototype for n_tty_receive_char(). Prototype was for n_tty_receive_char_special() instead
2067: warning: Function parameter or member 'kbuf' not described in 'n_tty_read'
2067: warning: Function parameter or member 'cookie' not described in 'n_tty_read'
2067: warning: Function parameter or member 'offset' not described in 'n_tty_read'
2067: warning: Excess function parameter 'buf' description in 'n_tty_read'
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20211126081611.11001-16-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 5b0f50373fc6..feef156803c2 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -596,7 +596,7 @@ break_out: } /** - * process_echoes - write pending echo characters + * __process_echoes - write pending echo characters * @tty: terminal device * * Write previously buffered echo (and other ldisc-generated) @@ -619,7 +619,6 @@ break_out: * * Locking: callers must hold output_lock */ - static size_t __process_echoes(struct tty_struct *tty) { struct n_tty_data *ldata = tty->disc_data; @@ -1091,6 +1090,16 @@ static void eraser(unsigned char c, struct tty_struct *tty) finish_erasing(ldata); } + +static void __isig(int sig, struct tty_struct *tty) +{ + struct pid *tty_pgrp = tty_get_pgrp(tty); + if (tty_pgrp) { + kill_pgrp(tty_pgrp, sig, 1); + put_pid(tty_pgrp); + } +} + /** * isig - handle the ISIG optio * @sig: signal @@ -1105,16 +1114,6 @@ static void eraser(unsigned char c, struct tty_struct *tty) * * Locking: ctrl.lock */ - -static void __isig(int sig, struct tty_struct *tty) -{ - struct pid *tty_pgrp = tty_get_pgrp(tty); - if (tty_pgrp) { - kill_pgrp(tty_pgrp, sig, 1); - put_pid(tty_pgrp); - } -} - static void isig(int sig, struct tty_struct *tty) { struct n_tty_data *ldata = tty->disc_data; @@ -1247,19 +1246,6 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c) process_echoes(tty); } -/** - * n_tty_receive_char - perform processing - * @tty: terminal device - * @c: character - * - * Process an individual character of input received from the driver. - * This is serialized with respect to itself by the rules for the - * driver above. - * - * n_tty_receive_buf()/producer path: - * caller holds non-exclusive termios_rwsem - * publishes canon_head if canonical mode is active - */ static void n_tty_receive_char_special(struct tty_struct *tty, unsigned char c) { struct n_tty_data *ldata = tty->disc_data; @@ -1394,6 +1380,19 @@ handle_newline: put_tty_queue(c, ldata); } +/** + * n_tty_receive_char - perform processing + * @tty: terminal device + * @c: character + * + * Process an individual character of input received from the driver. + * This is serialized with respect to itself by the rules for the + * driver above. + * + * n_tty_receive_buf()/producer path: + * caller holds non-exclusive termios_rwsem + * publishes canon_head if canonical mode is active + */ static void n_tty_receive_char(struct tty_struct *tty, unsigned char c) { struct n_tty_data *ldata = tty->disc_data; @@ -2046,8 +2045,10 @@ static int job_control(struct tty_struct *tty, struct file *file) * n_tty_read - read function for tty * @tty: tty device * @file: file object - * @buf: userspace buffer pointer + * @kbuf: kernelspace buffer pointer * @nr: size of I/O + * @cookie: if non-%NULL, this is a continuation read + * @offset: where to continue reading from (unused in n_tty) * * Perform reads for the line discipline. We are guaranteed that the * line discipline will not be closed under us but we may get multiple |