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: <CAHp75VfgSphDN9TVgeiPGdcDVqutcGnTURqu6r143sjJDsPXUA@mail.gmail.com>
Date:   Mon, 11 Apr 2022 20:11:46 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Markuss Broks <markuss.broks@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        phone-devel@...r.kernel.org,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
        <devicetree@...r.kernel.org>, Hans de Goede <hdegoede@...hat.com>, Andy
        Shevchenko <andy.shevchenko@...il.com>," 
        <~postmarketos/upstreaming@...ts.sr.ht>,
        Pavel Machek <pavel@....cz>, Rob Herring <robh+dt@...nel.org>,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Linus Walleij <linus.walleij@...aro.org>,
        Linux LED Subsystem <linux-leds@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>
Subject: Re: [PATCH v6 2/2] leds: ktd2692: Make aux-gpios optional

On Sat, Apr 9, 2022 at 8:14 AM Markuss Broks <markuss.broks@...il.com> wrote:
>
> Make the AUX pin optional, since it isn't a core part of functionality,
> and the device is designed to be operational with only one CTRL pin.
>
> Also pick up maintenance for the LED driver and the yaml bindings.

It's polite to Cc reviewers of your previous versions of the series.

While this patch is fine to me,
Reviewed-by: Andy Shevchenko <andy.shevchenko@...il.com>
one comment below.

> Signed-off-by: Markuss Broks <markuss.broks@...il.com>
> ---
>  MAINTAINERS                       | 6 ++++++
>  drivers/leds/flash/leds-ktd2692.c | 6 +++---
>  2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 2db49ea7ae55..8ef5667a1d98 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10479,6 +10479,12 @@ S:     Maintained
>  F:     Documentation/devicetree/bindings/leds/backlight/kinetic,ktd253.yaml
>  F:     drivers/video/backlight/ktd253-backlight.c
>
> +KTD2692 FLASH LED DRIVER
> +M:     Markuss Broks <markuss.broks@...il.com>
> +S:     Maintained
> +F:     Documentation/devicetree/bindings/leds/backlight/kinetic,ktd2692.yaml
> +F:     drivers/leds/flash/leds-ktd2692.yaml
> +
>  KTEST
>  M:     Steven Rostedt <rostedt@...dmis.org>
>  M:     John Hawley <warthog9@...lescrag.net>
> diff --git a/drivers/leds/flash/leds-ktd2692.c b/drivers/leds/flash/leds-ktd2692.c
> index f341da1503a4..01ceea83af67 100644
> --- a/drivers/leds/flash/leds-ktd2692.c
> +++ b/drivers/leds/flash/leds-ktd2692.c
> @@ -284,9 +284,9 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
>                 return ret;
>         }
>
> -       led->aux_gpio = devm_gpiod_get(dev, "aux", GPIOD_ASIS);
> -       ret = PTR_ERR_OR_ZERO(led->aux_gpio);
> -       if (ret) {
> +       led->aux_gpio = devm_gpiod_get_optional(dev, "aux", GPIOD_ASIS);
> +       if (IS_ERR(led->aux_gpio)) {
> +               ret = PTR_ERR(led->aux_gpio);
>                 dev_err(dev, "cannot get aux-gpios %d\n", ret);
>                 return ret;

Now you may consider switching to dev_err_probe() in a separate patch:

       if (IS_ERR(led->aux_gpio))
               return dev_err_probe(dev, PTR_ERR(led->aux_gpio),
"cannot get aux-gpios\n");

>         }

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ