tty: Move TIOCSTI toggle variable before kerndoc
PATCH 1/1 tty: Move TIOCSTI toggle variable before kerndoc
The variable "tty_legacy_tiocsti" should be defined before the kerndoc for the tiocsti() function. The new variable was breaking the "htmldocs" build target:
drivers/tty/tty_io.c:2271: warning: cannot understand function prototype: 'bool tty_legacy_tiocsti __read_mostly = IS_ENABLED(CONFIG_LEGACY_TIOCSTI); '
Reported-by Stephen Rothwell <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Jiri Slaby <[email protected]>
Signed-off-by Kees Cook <[email protected]>
--- drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/tty_io.c +1 -1
@@ -2255,6 +2255,7 @@ static int tty_fasync(int fd, struct file *filp, int on)return retval; } +static bool tty_legacy_tiocsti__read_mostly =IS_ENABLED (CONFIG_LEGACY_TIOCSTI );/** * tiocsti - fake input character * @tty: tty to fake input into
@@ -2268,7 +2269,6 @@ static int tty_fasync(int fd, struct file *filp, int on)* * Called functions take tty_ldiscs_lock * * current->signal->tty check is safe without locks */ -static bool tty_legacy_tiocsti__read_mostly =IS_ENABLED (CONFIG_LEGACY_TIOCSTI );static int tiocsti (struct tty_struct *tty,char __user *p) {char ch, mbz =0 ;
Signature · 1 line
2.34.1
Quoted 11 lines · Kees Cook
The variable "
tty_legacy_tiocsti" should be defined before the kerndoc for thetiocsti()function. The new variable was breaking the "htmldocs" build target:
drivers/tty/tty_io.c:2271: warning: cannot understand function prototype: 'booltty_legacy_tiocsti__read_mostly=IS_ENABLED(CONFIG_LEGACY_TIOCSTI); 'Reported-by Stephen Rothwell <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Jiri Slaby <[email protected]>Signed-off-by Kees Cook <[email protected]>
Acked-by Randy Dunlap <[email protected]>
Thanks.
Quoted 24 lines
--- drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/tty_io.c +1
-1@@ -2255,6 +2255,7 @@ static int tty_fasync(int fd, struct file *filp, int on)return retval; } +static bool tty_legacy_tiocsti__read_mostly =IS_ENABLED (CONFIG_LEGACY_TIOCSTI );/** * tiocsti - fake input character * @tty: tty to fake input into @@ -2268,7 +2269,6 @@ static int tty_fasync(int fd, struct file *filp, int on)* * Called functions take tty_ldiscs_lock * * current->signal->tty check is safe without locks */ -static bool tty_legacy_tiocsti__read_mostly =IS_ENABLED (CONFIG_LEGACY_TIOCSTI );static int tiocsti (struct tty_struct *tty,char __user *p) {char ch, mbz =0 ;
Signature · 1 line
~Randy