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: <CAKxU2N91q=d_c===x=AL+pwXkz8K1B8eXj8ePfm6dK_4cAk9Gg@mail.gmail.com>
Date: Wed, 13 Aug 2025 15:59:30 -0700
From: Rosen Penev <rosenp@...il.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: linux-wireless@...r.kernel.org, Toke Høiland-Jørgensen <toke@...e.dk>, 
	Johannes Berg <johannes@...solutions.net>, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>, 
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>, 
	"open list:MIPS" <linux-mips@...r.kernel.org>
Subject: Re: [PATCHv2 2/3] wifi: ath9k: ahb: add led pin OF support

On Wed, Aug 13, 2025 at 1:20 AM Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> On 12/08/2025 21:23, Rosen Penev wrote:
> > The old and removed platform code had support for assigning a value for
> > the LED pin for when the default is not correct. Effectively a fix for a
> > non working LED.
> >
> > For setting an LED to active high, a negation of led-active-low is used,
> > as two drivers currently use that and no drivers use led-active-high or
> > something similar.
> >
> > Signed-off-by: Rosen Penev <rosenp@...il.com>
> > ---
> >  drivers/net/wireless/ath/ath9k/init.c | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
> > index c911b178dcc2..7826b113235d 100644
> > --- a/drivers/net/wireless/ath/ath9k/init.c
> > +++ b/drivers/net/wireless/ath/ath9k/init.c
> > @@ -662,6 +662,17 @@ static int ath9k_of_init(struct ath_softc *sc)
> >       if (ret == -EPROBE_DEFER)
> >               return ret;
> >
> > +     np = of_get_child_by_name(np, "led");
> > +     if (np && of_device_is_available(np)) {
>
> You are open-coding of_get_available_child_by_name().
Will fix.
>
> > +             u32 led_pin;
> > +
> > +             if (!of_property_read_u32(np, "reg", &led_pin))
> > +                     ah->led_pin = led_pin;
> > +
> > +             ah->config.led_active_high = !of_property_read_bool(np, "led-active-low");
> > +             of_node_put(np);
> > +     }
>
> Leaking OF node.

Not following here.
>
> > +
> >       return 0;
> >  }
> >
>
>
> Best regards,
> Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ