Re: [PATCH] leds: lp3944: improve wording and formatting in a comment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
Cc: Richard Purdie <rpurdie@xxxxxxxxx>
Cc: Jacek Anaszewski <j.anaszewski@xxxxxxxxxxx>
---
  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
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux