Commit 72a8dcd7 authored by Xiaofei Tan's avatar Xiaofei Tan Committed by Greg Kroah-Hartman

tty: tty_ldisc: Fix coding style issues of block comments

Fix coding style issues of block comments, reported by checkpatch.pl.
Signed-off-by: default avatarXiaofei Tan <tanxiaofei@huawei.com>
Link: https://lore.kernel.org/r/1617779210-51576-9-git-send-email-tanxiaofei@huawei.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d7238359
...@@ -529,9 +529,11 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old) ...@@ -529,9 +529,11 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
const char *name = tty_name(tty); const char *name = tty_name(tty);
pr_warn("Falling back ldisc for %s.\n", name); pr_warn("Falling back ldisc for %s.\n", name);
/* The traditional behaviour is to fall back to N_TTY, we /*
want to avoid falling back to N_NULL unless we have no * The traditional behaviour is to fall back to N_TTY, we
choice to avoid the risk of breaking anything */ * want to avoid falling back to N_NULL unless we have no
* choice to avoid the risk of breaking anything
*/
if (tty_ldisc_failto(tty, N_TTY) < 0 && if (tty_ldisc_failto(tty, N_TTY) < 0 &&
tty_ldisc_failto(tty, N_NULL) < 0) tty_ldisc_failto(tty, N_NULL) < 0)
panic("Couldn't open N_NULL ldisc for %s.", name); panic("Couldn't open N_NULL ldisc for %s.", name);
...@@ -600,17 +602,21 @@ int tty_set_ldisc(struct tty_struct *tty, int disc) ...@@ -600,17 +602,21 @@ int tty_set_ldisc(struct tty_struct *tty, int disc)
up_read(&tty->termios_rwsem); up_read(&tty->termios_rwsem);
} }
/* At this point we hold a reference to the new ldisc and a /*
reference to the old ldisc, or we hold two references to * At this point we hold a reference to the new ldisc and a
the old ldisc (if it was restored as part of error cleanup * reference to the old ldisc, or we hold two references to
above). In either case, releasing a single reference from * the old ldisc (if it was restored as part of error cleanup
the old ldisc is correct. */ * above). In either case, releasing a single reference from
* the old ldisc is correct.
*/
new_ldisc = old_ldisc; new_ldisc = old_ldisc;
out: out:
tty_ldisc_unlock(tty); tty_ldisc_unlock(tty);
/* Restart the work queue in case no characters kick it off. Safe if /*
already running */ * Restart the work queue in case no characters kick it off. Safe if
* already running
*/
tty_buffer_restart_work(tty->port); tty_buffer_restart_work(tty->port);
err: err:
tty_ldisc_put(new_ldisc); /* drop the extra reference */ tty_ldisc_put(new_ldisc); /* drop the extra reference */
...@@ -812,8 +818,10 @@ void tty_ldisc_release(struct tty_struct *tty) ...@@ -812,8 +818,10 @@ void tty_ldisc_release(struct tty_struct *tty)
tty_ldisc_kill(o_tty); tty_ldisc_kill(o_tty);
tty_ldisc_unlock_pair(tty, o_tty); tty_ldisc_unlock_pair(tty, o_tty);
/* And the memory resources remaining (buffers, termios) will be /*
disposed of when the kref hits zero */ * And the memory resources remaining (buffers, termios) will be
* disposed of when the kref hits zero
*/
tty_ldisc_debug(tty, "released\n"); tty_ldisc_debug(tty, "released\n");
} }
......
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