LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Pavel Machek <pavel@ucw.cz>, 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
Subject: Re: [PATCH v2] tty: implement led triggers
Date: Thu, 10 May 2018 12:25:21 +0100	[thread overview]
Message-ID: <01dcbf5c-70a0-b067-20c3-f99e22ed4512@arm.com> (raw)
In-Reply-To: <20180510111434.GC6977@amd>

On 10/05/18 12:14, Pavel Machek wrote:
> 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...)

Well, the variable itself could always be named "delay_ms" if it's 
really that important.

Robin.

  reply	other threads:[~2018-05-10 11:25 UTC|newest]

Thread overview: 12+ 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:10 ` Pavel Machek
2018-05-03 11:52   ` Uwe Kleine-König
2018-05-03 12:33 ` Robin Murphy
2018-05-03 20:19   ` [PATCH v2] tty: implement led triggers Uwe Kleine-König
2018-05-04  0:29     ` kbuild test robot
2018-05-07  8:02     ` Johan Hovold
2018-05-07  8:41       ` Uwe Kleine-König
2018-05-07  9:27         ` Johan Hovold
2018-05-10 11:14           ` Pavel Machek
2018-05-10 11:25             ` Robin Murphy [this message]
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=01dcbf5c-70a0-b067-20c3-f99e22ed4512@arm.com \
    --to=robin.murphy@arm.com \
    --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=pavel@ucw.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).