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] [day] [month] [year] [list]
Message-ID: <f21a111a-e4e1-45ee-b116-8e52c70777a8@broadcom.com>
Date: Mon, 29 Jul 2024 11:55:39 +0200
From: Arend van Spriel <arend.vanspriel@...adcom.com>
To: Dragan Simic <dsimic@...jaro.org>
Cc: Jacobe Zang <jacobe.zang@...ion.com>, robh@...nel.org,
 krzk+dt@...nel.org, heiko@...ech.de, kvalo@...nel.org, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
 conor+dt@...nel.org, efectn@...tonmail.com, jagan@...eble.ai,
 devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
 arend@...adcom.com, linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
 duoming@....edu.cn, bhelgaas@...gle.com, minipli@...ecurity.net,
 brcm80211@...ts.linux.dev, brcm80211-dev-list.pdl@...adcom.com,
 nick@...das.com
Subject: Re: [PATCH v4 4/5] wifi: brcmfmac: Add optional lpo clock enable
 support

On 7/29/2024 11:12 AM, Dragan Simic wrote:
> Hello Ondrej,
> 
> On 2024-07-29 10:44, Ondřej Jirman wrote:
>> On Mon, Jul 29, 2024 at 09:12:20AM GMT, Dragan Simic wrote:
>>> Hello Jacobe,
>>>
>>> [...]
>>>
>>> >
>>> > +    clk = devm_clk_get_optional_enabled(dev, "lpo");
>>> > +    if (IS_ERR(clk))
>>> > +    if (clk) {
>>>
>>> These two lines looks really confusing.  Shouldn't it be just a single
>>> "if (!IS_ERR(clk)) {" line instead?
>>
>> It should be `!IS_ERR(clk) && clk` otherwise the debug message will be
>> incorrect.
> 
> Ah, I see now, thanks.  There's also IS_ERR_OR_NULL, so the condition
> can actually be "!IS_ERR_OR_NULL(clk)".

++ best suggestion

>>> > +        brcmf_dbg(INFO, "enabling 32kHz clock\n");
>>> > +        clk_set_rate(clk, 32768);
>>> > +    }
>>> > +
>>> >      if (!np || !of_device_is_compatible(np, "brcm,bcm4329-fmac"))
>>> >          return;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ