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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8ef9eee8-4f7b-6849-9151-210738e8fff6@gmail.com>
Date:   Wed, 25 Nov 2020 19:16:03 +0100
From:   Jacek Anaszewski <jacek.anaszewski@...il.com>
To:     Gene Chen <gene.chen.richtek@...il.com>, pavel@....cz,
        robh+dt@...nel.org, matthias.bgg@...il.com
Cc:     dmurphy@...com, linux-leds@...r.kernel.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
        gene_chen@...htek.com, Wilma.Wu@...iatek.com,
        shufan_lee@...htek.com, cy_huang@...htek.com,
        benjamin.chao@...iatek.com
Subject: Re: [PATCH v8 2/6] leds: flash: Fix multicolor registration no-ops by
 return 0

Hi Gene,

Thank you for the fix.

Would you mind fixing in the same patch also a duplication of
led_classdev_multicolor_register() and
devm_led_classdev_multicolor_register(), by moving them
outside of #ifdef block ?

They look identical for both CONFIG_LEDS_CLASS_MULTICOLOR states.

On 11/25/20 11:51 AM, Gene Chen wrote:
> From: Gene Chen <gene_chen@...htek.com>
> 
> Fix multicolor registration no-ops by return 0
> 
> Signed-off-by: Gene Chen <gene_chen@...htek.com>
> ---
>   include/linux/led-class-multicolor.h | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/led-class-multicolor.h b/include/linux/led-class-multicolor.h
> index 5116f9a..dbf3832 100644
> --- a/include/linux/led-class-multicolor.h
> +++ b/include/linux/led-class-multicolor.h
> @@ -83,7 +83,7 @@ static inline int led_classdev_multicolor_register_ext(struct device *parent,
>   					    struct led_classdev_mc *mcled_cdev,
>   					    struct led_init_data *init_data)
>   {
> -	return -EINVAL;
> +	return 0;
>   }
>   
>   static inline int led_classdev_multicolor_register(struct device *parent,
> @@ -96,14 +96,14 @@ static inline void led_classdev_multicolor_unregister(struct led_classdev_mc *mc
>   static inline int led_mc_calc_color_components(struct led_classdev_mc *mcled_cdev,
>   					       enum led_brightness brightness)
>   {
> -	return -EINVAL;
> +	return 0;
>   }
>   
>   static inline int devm_led_classdev_multicolor_register_ext(struct device *parent,
>   					  struct led_classdev_mc *mcled_cdev,
>   					  struct led_init_data *init_data)
>   {
> -	return -EINVAL;
> +	return 0;
>   }
>   
>   static inline int devm_led_classdev_multicolor_register(struct device *parent,
> 

-- 
Best regards,
Jacek Anaszewski

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ