Linux LED subsystem development
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Antonio Ospite <ao2@ao2.it>
Cc: linux-leds@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH] leds: lp3944: improve wording and formatting in a comment
Date: Wed, 27 Jan 2016 15:56:21 +0100	[thread overview]
Message-ID: <56A8DA95.7090803@samsung.com> (raw)
In-Reply-To: <1453905098-7020-1-git-send-email-ao2@ao2.it>

Hi Antonio,

Thanks for the patch.

On 01/27/2016 03:31 PM, Antonio Ospite wrote:
> Improve the wording for the comment about the led status, and while at
> it also use the standard formatting for multi-line comments.
>
> Signed-off-by: Antonio Ospite <ao2@ao2.it>
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
> ---
>   drivers/leds/leds-lp3944.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c
> index 6c758ae..793838e 100644
> --- a/drivers/leds/leds-lp3944.c
> +++ b/drivers/leds/leds-lp3944.c
> @@ -199,8 +199,10 @@ static int lp3944_led_set(struct lp3944_led_data *led, u8 status)
>   	if (status > LP3944_LED_STATUS_DIM1)
>   		return -EINVAL;
>
> -	/* invert only 0 and 1, leave unchanged the other values,
> -	 * remember we are abusing status to set blink patterns
> +	/*
> +	 * Invert status only if it is < 2 (i.e. 0 or 1), leave it unchanged
> +	 * otherwise because we are abusing the status to set blink patterns
> +	 * too.
>   	 */

The "too" at the end doesn't improve the comment. It adds some
incomplete information. Could you explain what does it mean that status
is abused to set blink patterns, please? And usually "too" means
"in addition to something", but here we don't know what we are referring
to.

>   	if (led->type == LP3944_LED_TYPE_LED_INVERTED && status < 2)
>   		status = 1 - status;
>


-- 
Best Regards,
Jacek Anaszewski

  reply	other threads:[~2016-01-27 14:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 14:31 [PATCH] leds: lp3944: improve wording and formatting in a comment Antonio Ospite
2016-01-27 14:56 ` Jacek Anaszewski [this message]
2016-01-27 16:31   ` Antonio Ospite
2016-01-28  7:35     ` Jacek Anaszewski
2016-01-28 15:49       ` [PATCHv2] " Antonio Ospite
2016-01-29  8:34         ` Jacek Anaszewski

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=56A8DA95.7090803@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=ao2@ao2.it \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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