From: Pavel Machek <pavel@ucw.cz>
To: Johan Hovold <johan@kernel.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
linux-serial@vger.kernel.org,
"One Thousand Gnomes" <gnomes@lxorguk.ukuu.org.uk>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Mathieu Poirier" <mathieu.poirier@linaro.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
linux-arm-kernel@lists.infradead.org,
"Robin Murphy" <robin.murphy@arm.com>
Subject: Re: [PATCH v2] tty: implement led triggers
Date: Thu, 10 May 2018 13:14:34 +0200 [thread overview]
Message-ID: <20180510111434.GC6977@amd> (raw)
In-Reply-To: <20180507092710.GQ2285@localhost>
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
Hi!
> > > > @@ -499,6 +500,7 @@ static void flush_to_ldisc(struct work_struct *work)
> > > > struct tty_buffer *head = buf->head;
> > > > struct tty_buffer *next;
> > > > int count;
> > > > + unsigned long delay = 50 /* ms */;
> > >
> > > Comment after the semicolon?
> >
> > Given that this comment is about the 50 and not the delay member, I
> > prefer it before the ;.
>
> Hmm. I personally find it hard to read and can only find about 30
> instances of this comment style (for assignments) in the kernel. And
> arguably the comment applies equally well to the delay variable in this
> case too.
It is not too traditional, but I believe it makes sense....
(and yes, I wish we had kernel in Rust, so we could have real units
attached to our variables...)
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] tty: implement led triggers
Date: Thu, 10 May 2018 13:14:34 +0200 [thread overview]
Message-ID: <20180510111434.GC6977@amd> (raw)
In-Reply-To: <20180507092710.GQ2285@localhost>
Hi!
> > > > @@ -499,6 +500,7 @@ static void flush_to_ldisc(struct work_struct *work)
> > > > struct tty_buffer *head = buf->head;
> > > > struct tty_buffer *next;
> > > > int count;
> > > > + unsigned long delay = 50 /* ms */;
> > >
> > > Comment after the semicolon?
> >
> > Given that this comment is about the 50 and not the delay member, I
> > prefer it before the ;.
>
> Hmm. I personally find it hard to read and can only find about 30
> instances of this comment style (for assignments) in the kernel. And
> arguably the comment applies equally well to the delay variable in this
> case too.
It is not too traditional, but I believe it makes sense....
(and yes, I wish we had kernel in Rust, so we could have real units
attached to our variables...)
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180510/fe3e817a/attachment.sig>
next prev parent reply other threads:[~2018-05-10 11:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 10:04 [PATCH] tty: implement a rx led trigger Uwe Kleine-König
2018-05-03 10:04 ` Uwe Kleine-König
2018-05-03 10:10 ` Pavel Machek
2018-05-03 10:10 ` Pavel Machek
2018-05-03 11:52 ` Uwe Kleine-König
2018-05-03 11:52 ` Uwe Kleine-König
2018-05-03 12:33 ` Robin Murphy
2018-05-03 12:33 ` Robin Murphy
2018-05-03 20:19 ` [PATCH v2] tty: implement led triggers Uwe Kleine-König
2018-05-03 20:19 ` Uwe Kleine-König
2018-05-04 0:29 ` kbuild test robot
2018-05-04 0:29 ` kbuild test robot
2018-05-07 8:02 ` Johan Hovold
2018-05-07 8:02 ` Johan Hovold
2018-05-07 8:41 ` Uwe Kleine-König
2018-05-07 8:41 ` Uwe Kleine-König
2018-05-07 9:27 ` Johan Hovold
2018-05-07 9:27 ` Johan Hovold
2018-05-10 11:14 ` Pavel Machek [this message]
2018-05-10 11:14 ` Pavel Machek
2018-05-10 11:25 ` Robin Murphy
2018-05-10 11:25 ` Robin Murphy
2018-05-12 19:00 ` Uwe Kleine-König
2018-05-12 19:00 ` Uwe Kleine-König
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=20180510111434.GC6977@amd \
--to=pavel@ucw.cz \
--cc=f.fainelli@gmail.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=johan@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=robin.murphy@arm.com \
--cc=u.kleine-koenig@pengutronix.de \
/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.