[PW_SID:1079304] [1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool#1746
[PW_SID:1079304] [1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool#1746linux-riscv-bot wants to merge 2 commits into
Conversation
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>
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 1: "[1/2] riscv: cpu_ops: Change return value type of cpu_is_stopped() to bool" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
|
Patch 2: "[2/2] riscv: cpu_ops_sbi: No need to be bothered to check ret.error" |
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