Commit 01dc937a authored by Liao Yuanhong's avatar Liao Yuanhong Committed by Paul Walmsley
Browse files

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: default avatarLiao Yuanhong <liaoyuanhong@vivo.com>
Reviewed-by: default avatarAtish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20250828122510.30843-1-liaoyuanhong@vivo.com


Signed-off-by: default avatarPaul Walmsley <pjw@kernel.org>
parent 17e95210
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}

/*