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: <9f248b0e2645a29b83ee503701e04d57@manjaro.org>
Date: Mon, 29 Jul 2024 11:12:19 +0200
From: Dragan Simic <dsimic@...jaro.org>
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, arend.vanspriel@...adcom.com, 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

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)".

>> > +		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