Skip to content

[PW_SID:1079304] [1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool#1746

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1079304
Closed

[PW_SID:1079304] [1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool#1746
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw1079304

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 1079304 applied to workflow__riscv__fixes

Name: [1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1079304
Version: 1

In the original sbi_cpu_is_stopped(), if rc doesn't equal to the
SBI_HSM_STATE_STOPPED, it will return rc to the caller directly. But
there is a hidden problem, the rc could be SBI_HSM_STATE_STARTED, if
so, this function will report cpu stopped while the cpu isn't really
stopped.

Furthermore, from the name of cpu_is_stopped(), it gives a sense the
return value is a bool type, true means the cpu is stopped, conversely
false means the cpu is not stopped.

Here change the return value type to bool and change the callers
accordingly. This could fix the above two issues.

Fixes: f1e5858 ("RISC-V: Support cpu hotplug")
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
If the ret.error equals to 0, the sbi_err_map_linux_errno() can also
handle it, i.e. if ret.error is SBI_SUCCESS, it will return 0
immediately, so no need to be bothered to check ret.error here.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 135.46 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1125.94 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1623.12 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 25.69 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 1.20 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
kdoc
Desc: Detects for kdoc errors
Duration: 0.81 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
module-param
Desc: Detect module_param changes
Duration: 0.26 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.28 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.68 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 135.11 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1099.85 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1609.59 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 24.70 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 25.64 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 6.14 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 82.05 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
kdoc
Desc: Detects for kdoc errors
Duration: 0.88 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.31 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot deleted the pw1079304 branch April 13, 2026 14:22
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