Skip to content

[PW_SID:990174] clk: convert drivers from deprecated round_rate() to determine_rate() - #755

Closed
linux-riscv-bot wants to merge 114 commits into
workflow__riscv__fixesfrom
pw990174
Closed

[PW_SID:990174] clk: convert drivers from deprecated round_rate() to determine_rate()#755
linux-riscv-bot wants to merge 114 commits into
workflow__riscv__fixesfrom
pw990174

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 990174 applied to workflow__riscv__fixes

Name: clk: convert drivers from deprecated round_rate() to determine_rate()
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=990174
Version: 1

masneyb added 30 commits August 11, 2025 23:18
determine_rate() is expected to return an error code, or 0 on success.
clk_sam9x5_peripheral_determine_rate() has a branch that returns the
parent rate on a certain case. This is the behavior of round_rate(),
so let's go ahead and fix this by setting req->rate.

Fixes: b4c115c ("clk: at91: clk-peripheral: add support for changeable parent rate")
Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

This driver already has a clk_sam9x5_peripheral_determine_rate()
implementation, however it can change the parent rate. The existing
round rate does not have this functionality. I could add a check
for CLK_SET_RATE_PARENT, and combine the two functions, however there
are some other minor differences in the two implementations. I don't
have access to this particular hardware. I believe that they could
be combined, however it would need to be tested on real hardware.
So, let's play it safe and convert the existing round rate
implementation to ensure that the driver keeps the same functionality
as before.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, and determine_rate() should be
used instead. We can't just simply convert this driver over initially
since other drivers depend on this. So let's go ahead and add a
determine_rate() clk ops. Once all of the drivers have been converted,
then the round_rate() clk ops can be dropped.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…mine_rate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…K_STUB()

When trying to use Coccinelle to make changes inside drivers/clk/, it
really does not like the trailing comma at the end of the declaration
of DEFINE_CLK_STUB, and fails to process this file. It also looks weird
to not have commas to separate the various array members of
hi3660_stub_clks. Let's move the trailing comma out of the define so
that Coccinelle can be ran against this source file.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…ate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
…ate()

The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.

Signed-off-by: Brian Masney <bmasney@redhat.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 112: "[112/114] clk: scmi: remove round_rate() in favor of determine_rate()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.71 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 112: "[112/114] clk: scmi: remove round_rate() in favor of determine_rate()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 112: "[112/114] clk: scmi: remove round_rate() in favor of determine_rate()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.90 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 112: "[112/114] clk: scmi: remove round_rate() in favor of determine_rate()"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 112: "[112/114] clk: scmi: remove round_rate() in favor of determine_rate()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 112: "[112/114] clk: scmi: remove round_rate() in favor of determine_rate()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.90 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1054.75 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1368.80 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.28 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.20 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.75 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.71 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 113: "[113/114] clk: sophgo: sg2042-pll: remove round_rate() in favor of determine_rate()"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 103.93 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1119.43 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1595.20 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 21.04 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 22.08 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.74 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 74.44 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
kdoc
Desc: Detects for kdoc errors
Duration: 0.92 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot

Copy link
Copy Markdown
Author

Patch 114: "[114/114] clk: fixed-factor: drop round_rate() clk ops"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.30 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants