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]
Date: Tue, 18 Jun 2024 14:47:21 +0800
From: Hanjun Guo <guohanjun@...wei.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>, Youwan Wang
	<youwan@...china.com>, <lpieralisi@...nel.org>
CC: <linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<lenb@...nel.org>
Subject: Re: [PATCH v1] ACPI /amba: Fix meaningless code for
 amba_register_dummy_clk()

On 2024/6/16 21:05, Christophe JAILLET wrote:
> Le 16/06/2024 à 12:00, Youwan Wang a écrit :
>> Defining `amba_dummy_clk` as static is meaningless.
>>
>> The conditional check `if (amba_dummy_clk)` is intended to
>> determine whether the clock has already been registered.
>> However,in this function, the variable `amba_dummy_clk`
>> will always be NULL.
> 
> Hi,
> 
>   can you elaborate on this "will always be NULL"?
> 
> I think that it is NULL on the first call of amba_register_dummy_clk(), 
> but if it is called again, it will have the value of 
> clk_register_fixed_rate() just a few lines after, doing exactly what the 
> comment says.

I think Youwan is arguing that amba_register_dummy_clk() will
never be called more than once, so the static define and check is
redundant.

Thanks
Hanjun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ