lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3ac3619-3b80-a9ab-fa0c-b56685291fd6@gmail.com>
Date:   Wed, 4 Jan 2017 20:59:00 +0100
From:   Jacek Anaszewski <jacek.anaszewski@...il.com>
To:     Andi Shyti <andi.shyti@...sung.com>,
        Richard Purdie <rpurdie@...ys.net>, Pavel Machek <pavel@....cz>
Cc:     linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andi Shyti <andi@...zian.org>
Subject: Re: [PATCH] leds: add LED_ON brightness as boolean value

Hi Andi,

Thanks for the patch.

On 01/04/2017 02:41 PM, Andi Shyti wrote:
> Some devices do not handle the led brightness or simply don't
> care about it. Conceptually said devices want to just switch on
> or off the led. It is useless in this case to have a 255 range
> of brightness, while just having an LED_ON and LED_OFF improves
> the boolean meaning of the led status.
> 
> Signed-off-by: Andi Shyti <andi.shyti@...sung.com>
> ---
>  include/linux/leds.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/leds.h b/include/linux/leds.h
> index 569cb531094c..0258f9c49034 100644
> --- a/include/linux/leds.h
> +++ b/include/linux/leds.h
> @@ -27,6 +27,7 @@ struct device;
>  
>  enum led_brightness {
>  	LED_OFF		= 0,
> +	LED_ON,

Now lack of explicit value assignment to LED_ON looks weird
since it is surrounded by other initializer values.
I'd prefer to have "LED_ON = 1," in this line.

>  	LED_HALF	= 127,
>  	LED_FULL	= 255,
>  };
> 

-- 
Best regards,
Jacek Anaszewski

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ