diff options
| author | Liao Yuanhong <liaoyuanhong@vivo.com> | 2025-08-28 20:25:09 +0800 |
|---|---|---|
| committer | Paul Walmsley <pjw@kernel.org> | 2025-09-18 08:18:43 -0600 |
| commit | 01dc937ac18dd0bc0fc77c24030639553f977ffe (patch) | |
| tree | 0972f7803a8587ab517bfe2b9cda242fd40dbc99 /drivers/perf | |
| parent | 17e9521044c9b3ee839f861d1ac35c5b5c20d16b (diff) | |
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>
Diffstat (limited to 'drivers/perf')
| -rw-r--r-- | drivers/perf/riscv_pmu_sbi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/riscv_pmu_sbi.c b/drivers/perf/riscv_pmu_sbi.c index 698de8ddf895..c18dbffa9834 100644 --- a/drivers/perf/riscv_pmu_sbi.c +++ b/drivers/perf/riscv_pmu_sbi.c @@ -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; } /* |
