From: Youwan Wang <youwan@nfschina.com>
To: youwan@nfschina.com
Cc: guohanjun@huawei.com, lenb@kernel.org,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, lpieralisi@kernel.org,
rafael@kernel.org, sudeep.holla@arm.com, catalin.marinas@arm.com,
will@kernel.org
Subject: [PATCH v4] ACPI / amba: Drop unnecessary check for registered amba_dummy_clk
Date: Mon, 24 Jun 2024 10:31:01 +0800 [thread overview]
Message-ID: <20240624023101.369633-1-youwan@nfschina.com> (raw)
In-Reply-To: <20240620133758.319392-1-youwan@nfschina.com>
amba_register_dummy_clk() is called only once from acpi_amba_init()
and acpi_amba_init() itself is called once during the initialisation.
amba_dummy_clk can't be initialised before this in any other code
path and hence the check for already registered amba_dummy_clk is
not necessary. Drop the same.
Signed-off-by: Youwan Wang <youwan@nfschina.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Hanjun Guo <guohanjun@huawei.com>
---
v1->v2->v3: Modify the commit log description
v3->v4: Update the commit message suggested by Sudeep;
Add Acked-by from Sudeep;
+Cc ARM64 maintainers Catalin and Will.
---
drivers/acpi/arm64/amba.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/acpi/arm64/amba.c b/drivers/acpi/arm64/amba.c
index 60be8ee1dbdc..ef438417cc80 100644
--- a/drivers/acpi/arm64/amba.c
+++ b/drivers/acpi/arm64/amba.c
@@ -35,11 +35,7 @@ static const struct acpi_device_id amba_id_list[] = {
static void amba_register_dummy_clk(void)
{
- static struct clk *amba_dummy_clk;
-
- /* If clock already registered */
- if (amba_dummy_clk)
- return;
+ struct clk *amba_dummy_clk;
amba_dummy_clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, 0, 0);
clk_register_clkdev(amba_dummy_clk, "apb_pclk", NULL);
--
2.25.1
next prev parent reply other threads:[~2024-06-24 2:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 11:58 [PATCH v3] ACPI /amba: Fix meaningless code for amba_register_dummy_clk() Youwan Wang
2024-06-19 12:33 ` Sudeep Holla
2024-06-20 13:37 ` [PATCH] ACPI / amba: Drop unnecessary check for registered amba_dummy_clk Youwan Wang
2024-06-24 2:09 ` Hanjun Guo
2024-06-24 2:31 ` Youwan Wang [this message]
2024-06-24 14:48 ` [PATCH v4] " Sudeep Holla
2024-06-24 15:02 ` Sudeep Holla
2024-06-24 18:11 ` Catalin Marinas
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=20240624023101.369633-1-youwan@nfschina.com \
--to=youwan@nfschina.com \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=will@kernel.org \
/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®