mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hanjun Guo <guohanjun@huawei.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Youwan Wang <youwan@nfschina.com>, <lpieralisi@kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <lenb@kernel.org>
Subject: Re: [PATCH v1] ACPI /amba: Fix meaningless code for amba_register_dummy_clk()
Date: Tue, 18 Jun 2024 14:47:21 +0800	[thread overview]
Message-ID: <56ecbfda-50b6-ee7f-aa62-28295d7121c0@huawei.com> (raw)
In-Reply-To: <1a6fda13-3a06-420d-a62a-896a7f4866d9@wanadoo.fr>

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

      reply	other threads:[~2024-06-18  6:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-16 10:00 Youwan Wang
2024-06-16 13:05 ` Christophe JAILLET
2024-06-18  6:47   ` Hanjun Guo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56ecbfda-50b6-ee7f-aa62-28295d7121c0@huawei.com \
    --to=guohanjun@huawei.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=lenb@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=youwan@nfschina.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®