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

Configure Feed

Select the types of activity you want to include in your feed.

tty: vt: fix up kernel-doc

selection.c and vt.c still uses tabs in the kernel-doc. This misrenders the
functions in the output -- sphinx misinterprets the description. So
remove these tabs, incl. those around dashes.

'enum' keyword is needed before enum names. Fix that.

Superfluous \n after the comments are also removed. They are not
completely faulty, but this unifies all the kernel-doc in the files.

Finally fix up the cross references.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Helge Deller <deller@gmx.de> # parisc STI console
Link: https://lore.kernel.org/r/20240122110401.7289-47-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby (SUSE) and committed by
Greg Kroah-Hartman
60234365 d1e22216

+62 -60
+16 -14
drivers/tty/vt/selection.c
··· 73 73 } 74 74 75 75 /** 76 - * clear_selection - remove current selection 76 + * clear_selection - remove current selection 77 77 * 78 - * Remove the current selection highlight, if any from the console 79 - * holding the selection. The caller must hold the console lock. 78 + * Remove the current selection highlight, if any from the console holding the 79 + * selection. 80 + * 81 + * Locking: The caller must hold the console lock. 80 82 */ 81 83 void clear_selection(void) 82 84 { ··· 112 110 } 113 111 114 112 /** 115 - * sel_loadlut() - load the LUT table 116 - * @lut: user table 113 + * sel_loadlut() - load the LUT table 114 + * @lut: user table 117 115 * 118 - * Load the LUT table from user space. Make a temporary copy so a partial 119 - * update doesn't make a mess. 116 + * Load the LUT table from user space. Make a temporary copy so a partial 117 + * update doesn't make a mess. 120 118 * 121 - * Locking: The console lock is acquired. 119 + * Locking: The console lock is acquired. 122 120 */ 123 121 int sel_loadlut(u32 __user *lut) 124 122 { ··· 175 173 } 176 174 177 175 /** 178 - * set_selection_user - set the current selection. 179 - * @sel: user selection info 180 - * @tty: the console tty 176 + * set_selection_user - set the current selection. 177 + * @sel: user selection info 178 + * @tty: the console tty 181 179 * 182 - * Invoked by the ioctl handle for the vt layer. 180 + * Invoked by the ioctl handle for the vt layer. 183 181 * 184 - * The entire selection process is managed under the console_lock. It's 185 - * a lot under the lock but its hardly a performance path 182 + * Locking: The entire selection process is managed under the console_lock. 183 + * It's a lot under the lock but its hardly a performance path. 186 184 */ 187 185 int set_selection_user(const struct tiocl_selection __user *sel, 188 186 struct tty_struct *tty)
+43 -43
drivers/tty/vt/vt.c
··· 1115 1115 } 1116 1116 1117 1117 /** 1118 - * vc_do_resize - resizing method for the tty 1119 - * @tty: tty being resized 1120 - * @vc: virtual console private data 1121 - * @cols: columns 1122 - * @lines: lines 1123 - * @from_user: invoked by a user? 1118 + * vc_do_resize - resizing method for the tty 1119 + * @tty: tty being resized 1120 + * @vc: virtual console private data 1121 + * @cols: columns 1122 + * @lines: lines 1123 + * @from_user: invoked by a user? 1124 1124 * 1125 - * Resize a virtual console, clipping according to the actual constraints. 1126 - * If the caller passes a tty structure then update the termios winsize 1127 - * information and perform any necessary signal handling. 1125 + * Resize a virtual console, clipping according to the actual constraints. If 1126 + * the caller passes a tty structure then update the termios winsize 1127 + * information and perform any necessary signal handling. 1128 1128 * 1129 - * Caller must hold the console semaphore. Takes the termios rwsem and 1130 - * ctrl.lock of the tty IFF a tty is passed. 1129 + * Locking: Caller must hold the console semaphore. Takes the termios rwsem and 1130 + * ctrl.lock of the tty IFF a tty is passed. 1131 1131 */ 1132 - 1133 1132 static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, 1134 1133 unsigned int cols, unsigned int lines, bool from_user) 1135 1134 { ··· 1276 1277 } 1277 1278 1278 1279 /** 1279 - * __vc_resize - resize a VT 1280 - * @vc: virtual console 1281 - * @cols: columns 1282 - * @rows: rows 1283 - * @from_user: invoked by a user? 1280 + * __vc_resize - resize a VT 1281 + * @vc: virtual console 1282 + * @cols: columns 1283 + * @rows: rows 1284 + * @from_user: invoked by a user? 1284 1285 * 1285 - * Resize a virtual console as seen from the console end of things. We 1286 - * use the common vc_do_resize methods to update the structures. The 1287 - * caller must hold the console sem to protect console internals and 1288 - * vc->port.tty 1286 + * Resize a virtual console as seen from the console end of things. We use the 1287 + * common vc_do_resize() method to update the structures. 1288 + * 1289 + * Locking: The caller must hold the console sem to protect console internals 1290 + * and @vc->port.tty. 1289 1291 */ 1290 1292 int __vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows, 1291 1293 bool from_user) ··· 1296 1296 EXPORT_SYMBOL(__vc_resize); 1297 1297 1298 1298 /** 1299 - * vt_resize - resize a VT 1300 - * @tty: tty to resize 1301 - * @ws: winsize attributes 1299 + * vt_resize - resize a VT 1300 + * @tty: tty to resize 1301 + * @ws: winsize attributes 1302 1302 * 1303 - * Resize a virtual terminal. This is called by the tty layer as we 1304 - * register our own handler for resizing. The mutual helper does all 1305 - * the actual work. 1303 + * Resize a virtual terminal. This is called by the tty layer as we register 1304 + * our own handler for resizing. The mutual helper does all the actual work. 1306 1305 * 1307 - * Takes the console sem and the called methods then take the tty 1308 - * termios_rwsem and the tty ctrl.lock in that order. 1306 + * Locking: Takes the console sem and the called methods then take the tty 1307 + * termios_rwsem and the tty ctrl.lock in that order. 1309 1308 */ 1310 1309 static int vt_resize(struct tty_struct *tty, struct winsize *ws) 1311 1310 { ··· 2632 2633 2633 2634 2634 2635 /** 2635 - * vc_sanitize_unicode - Replace invalid Unicode code points with U+FFFD 2636 - * @c: the received character, or U+FFFD for invalid sequences. 2636 + * vc_sanitize_unicode - Replace invalid Unicode code points with ``U+FFFD`` 2637 + * @c: the received character, or ``U+FFFD`` for invalid sequences. 2637 2638 */ 2638 2639 static inline int vc_sanitize_unicode(const int c) 2639 2640 { ··· 2644 2645 } 2645 2646 2646 2647 /** 2647 - * vc_translate_unicode - Combine UTF-8 into Unicode in @vc_utf_char 2648 + * vc_translate_unicode - Combine UTF-8 into Unicode in &vc_data.vc_utf_char 2648 2649 * @vc: virtual console 2649 2650 * @c: character to translate 2650 2651 * @rescan: we return true if we need more (continuation) data 2651 2652 * 2652 - * @vc_utf_char is the being-constructed unicode character. 2653 - * @vc_utf_count is the number of continuation bytes still expected to arrive. 2654 - * @vc_npar is the number of continuation bytes arrived so far. 2653 + * * &vc_data.vc_utf_char is the being-constructed unicode character. 2654 + * * &vc_data.vc_utf_count is the number of continuation bytes still expected to 2655 + * arrive. 2656 + * * &vc_data.vc_npar is the number of continuation bytes arrived so far. 2655 2657 */ 2656 2658 static int vc_translate_unicode(struct vc_data *vc, int c, bool *rescan) 2657 2659 { ··· 3030 3030 #ifdef CONFIG_VT_CONSOLE 3031 3031 3032 3032 /** 3033 - * vt_kmsg_redirect() - Sets/gets the kernel message console 3034 - * @new: The new virtual terminal number or -1 if the console should stay 3035 - * unchanged 3033 + * vt_kmsg_redirect() - sets/gets the kernel message console 3034 + * @new: the new virtual terminal number or -1 if the console should stay 3035 + * unchanged 3036 3036 * 3037 3037 * By default, the kernel messages are always printed on the current virtual 3038 3038 * console. However, the user may modify that default with the 3039 - * TIOCL_SETKMSGREDIRECT ioctl call. 3039 + * %TIOCL_SETKMSGREDIRECT ioctl call. 3040 3040 * 3041 3041 * This function sets the kernel message console to be @new. It returns the old 3042 - * virtual console number. The virtual terminal number 0 (both as parameter and 3042 + * virtual console number. The virtual terminal number %0 (both as parameter and 3043 3043 * return value) means no redirection (i.e. always printed on the currently 3044 3044 * active console). 3045 3045 * ··· 3047 3047 * value is not modified. You may use the macro vt_get_kmsg_redirect() in that 3048 3048 * case to make the code more understandable. 3049 3049 * 3050 - * When the kernel is compiled without CONFIG_VT_CONSOLE, this function ignores 3051 - * the parameter and always returns 0. 3050 + * When the kernel is compiled without %CONFIG_VT_CONSOLE, this function ignores 3051 + * the parameter and always returns %0. 3052 3052 */ 3053 3053 int vt_kmsg_redirect(int new) 3054 3054 { ··· 3960 3960 * RETURNS: zero if unbound, nonzero if bound 3961 3961 * 3962 3962 * Drivers can call this and if zero, they should release 3963 - * all resources allocated on con_startup() 3963 + * all resources allocated on &consw.con_startup() 3964 3964 */ 3965 3965 int con_is_bound(const struct consw *csw) 3966 3966 {
+3 -3
include/linux/console.h
··· 155 155 */ 156 156 157 157 /** 158 - * cons_flags - General console flags 158 + * enum cons_flags - General console flags 159 159 * @CON_PRINTBUFFER: Used by newly registered consoles to avoid duplicate 160 160 * output of messages that were already shown by boot 161 161 * consoles or read by userspace via syslog() syscall. ··· 236 236 static_assert(sizeof(struct nbcon_state) <= sizeof(int)); 237 237 238 238 /** 239 - * nbcon_prio - console owner priority for nbcon consoles 239 + * enum nbcon_prio - console owner priority for nbcon consoles 240 240 * @NBCON_PRIO_NONE: Unused 241 241 * @NBCON_PRIO_NORMAL: Normal (non-emergency) usage 242 242 * @NBCON_PRIO_EMERGENCY: Emergency output (WARN/OOPS...) ··· 468 468 * for_each_console() - Iterator over registered consoles 469 469 * @con: struct console pointer used as loop cursor 470 470 * 471 - * The console list and the console->flags are immutable while iterating. 471 + * The console list and the &console.flags are immutable while iterating. 472 472 * 473 473 * Requires console_list_lock to be held. 474 474 */