[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56ecbfda-50b6-ee7f-aa62-28295d7121c0@huawei.com>
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