drivers/perf: riscv: Remove redundant ternary operators

For ternary operators in the form of "a ? true : false", if 'a' itself
returns a boolean result, the ternary operator can be omitted. Remove
redundant ternary operators to clean up the code.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20250828122510.30843-1-liaoyuanhong@vivo.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
Liao Yuanhong 2025-08-28 20:25:09 +08:00 committed by Paul Walmsley
parent 17e9521044
commit 01dc937ac1

View File

@ -339,7 +339,7 @@ static bool pmu_sbi_ctr_is_fw(int cidx)
if (!info)
return false;
return (info->type == SBI_PMU_CTR_TYPE_FW) ? true : false;
return info->type == SBI_PMU_CTR_TYPE_FW;
}
/*