Re: [PATCH 6/9] tty: hvc_console: Fix coding style issues of block comments

From: Xiaofei Tan
Date: Tue May 18 2021 - 00:01:28 EST


Hi Johan,

Thanks for reviewing this patch.

On 2021/5/17 22:15, Johan Hovold wrote:
On Mon, May 17, 2021 at 02:37:10PM +0800, Xiaofei Tan wrote:
Fix coding style issues of block comments, reported by checkpatch.pl.
Besides, add a period at the end of the sentenses.

Signed-off-by: Xiaofei Tan <tanxiaofei@xxxxxxxxxx>
---
drivers/tty/hvc/hvc_console.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 39018e5..a61cdf0 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -177,7 +177,8 @@ static void hvc_console_print(struct console *co, const char *b,
r = cons_ops[index]->put_chars(vtermnos[index], c, i);
if (r <= 0) {
/* throw away characters on error
- * but spin in case of -EAGAIN */
+ * but spin in case of -EAGAIN.
+ */

How is this an improvement? First, the multi-line comment style is

/*
* ...
*/


Yes, mostly we use this style. I can follow it if new version is needed.
BTW, How about add the '/*' check into checkpatch.pl?

Second, that sentence is not capitalised so why do add a period?


How about capitalize the sentence, or just remove the period ?

Third, why are you sending checkpatch.pl cleanups for files outside of
staging?


I'm sorry, Is this a rule, or kind of tradition? I've never heard of this before.

Unless doing some real changes to the files in question as well this is
mostly just churn and noise that makes it harder to backport fixes and
do code forensics for no real gain.


I'm not sure. But if cleanup patches have made it hard to backport fixes and do code forensics, then the code quality may not be
good enough.

Greg may disagree, but I don't think we should be encouraging this kind
of patches.

Johan

.