mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
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:
parent
17e9521044
commit
01dc937ac1
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user