All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiaofei Tan <tanxiaofei@huawei.com>
To: <gregkh@linuxfoundation.org>, <jirislaby@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linuxarm@openeuler.org>,
	Xiaofei Tan <tanxiaofei@huawei.com>
Subject: [PATCH 08/10] tty: tty_ldisc: Fix coding style issues of block comments
Date: Mon, 5 Apr 2021 11:34:20 +0800	[thread overview]
Message-ID: <1617593662-25900-9-git-send-email-tanxiaofei@huawei.com> (raw)
In-Reply-To: <1617593662-25900-1-git-send-email-tanxiaofei@huawei.com>

Fix coding style issues of block comments, reported by checkpatch.pl.

Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
---
 drivers/tty/tty_ldisc.c | 32 ++++++++++++++++++++------------
 1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index df0b589..874d238 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -529,9 +529,11 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
 		const char *name = tty_name(tty);
 
 		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
-		   choice to avoid the risk of breaking anything */
+		/*
+		 * The traditional behaviour is to fall back to N_TTY, we
+		 * 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 &&
 		    tty_ldisc_failto(tty, N_NULL) < 0)
 			panic("Couldn't open N_NULL ldisc for %s.", name);
@@ -600,17 +602,21 @@ int tty_set_ldisc(struct tty_struct *tty, int disc)
 		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
-	   the old ldisc (if it was restored as part of error cleanup
-	   above). In either case, releasing a single reference from
-	   the old ldisc is correct. */
+	/*
+	 * At this point we hold a reference to the new ldisc and a
+	 * reference to the old ldisc, or we hold two references to
+	 * the old ldisc (if it was restored as part of error cleanup
+	 * above). In either case, releasing a single reference from
+	 * the old ldisc is correct.
+	 */
 	new_ldisc = old_ldisc;
 out:
 	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);
 err:
 	tty_ldisc_put(new_ldisc);	/* drop the extra reference */
@@ -812,8 +818,10 @@ void tty_ldisc_release(struct tty_struct *tty)
 		tty_ldisc_kill(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");
 }
-- 
2.8.1


  parent reply	other threads:[~2021-04-05  3:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05  3:34 [PATCH 00/10] tty: Fix some coding style issues Xiaofei Tan
2021-04-05  3:34 ` [PATCH 01/10] tty/sysrq: Add a blank line after declarations Xiaofei Tan
2021-04-05  3:34 ` [PATCH 02/10] tty/sysrq: Fix issues of code indent should use tabs Xiaofei Tan
2021-04-05  6:36   ` kernel test robot
2021-04-05  6:36     ` kernel test robot
2021-04-05  7:57   ` kernel test robot
2021-04-05  7:57     ` kernel test robot
2021-04-05  9:03   ` Xiaofei Tan
2021-04-09  8:35   ` [kbuild] " Dan Carpenter
2021-04-09  8:35     ` Dan Carpenter
2021-04-09  8:35     ` Dan Carpenter
2021-04-05  3:34 ` [PATCH 03/10] tty: tty_jobctrl: Add a blank line after declarations Xiaofei Tan
2021-04-05  3:34 ` [PATCH 04/10] tty: tty_jobctrl: Fix coding style issues of block comments Xiaofei Tan
2021-04-06  4:42   ` Jiri Slaby
2021-04-06  6:22     ` Xiaofei Tan
2021-04-05  3:34 ` [PATCH 05/10] tty: tty_jobctrl: Remove spaces before tabs Xiaofei Tan
2021-04-05  3:34 ` [PATCH 06/10] tty: tty_ldisc: Fix an issue of code indent should use tabs Xiaofei Tan
2021-04-05  3:34 ` [PATCH 07/10] tty: tty_ldisc: Add a blank line after declarations Xiaofei Tan
2021-04-05  3:34 ` Xiaofei Tan [this message]
2021-04-05  3:34 ` [PATCH 09/10] tty: tty_ldisc: Do not use assignment in if condition Xiaofei Tan
2021-04-05  3:34 ` [PATCH 10/10] tty: tty_ldisc: Remove the repeated word 'the' Xiaofei Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1617593662-25900-9-git-send-email-tanxiaofei@huawei.com \
    --to=tanxiaofei@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.