mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 23:33:01 -04:00
drm/amdgpu/amdgpu_cper: Remove redundant ternary operators
For ternary operators in the form of "a ? false : true", if 'a' itself returns a boolean result, the ternary operator can be omitted. Remove redundant ternary operators to clean up the code. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4320fd9e0d
commit
7670daf65a
@@ -174,7 +174,7 @@ int amdgpu_cper_entry_fill_runtime_section(struct amdgpu_device *adev,
|
||||
struct cper_sec_nonstd_err *section;
|
||||
bool poison;
|
||||
|
||||
poison = (sev == CPER_SEV_NON_FATAL_CORRECTED) ? false : true;
|
||||
poison = sev != CPER_SEV_NON_FATAL_CORRECTED;
|
||||
section_desc = (struct cper_sec_desc *)((uint8_t *)hdr + SEC_DESC_OFFSET(idx));
|
||||
section = (struct cper_sec_nonstd_err *)((uint8_t *)hdr +
|
||||
NONSTD_SEC_OFFSET(hdr->sec_cnt, idx));
|
||||
|
||||
Reference in New Issue
Block a user