diff options
| author | Liao Yuanhong <liaoyuanhong@vivo.com> | 2025-09-03 20:03:49 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-09-05 16:06:29 -0400 |
| commit | 9502b09933ed8debe9888c69b10e79e3a2b66800 (patch) | |
| tree | 5c7ac04a221ba9385865d33a3b3955c57ee199cf /drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | |
| parent | 8a4bc4508c6b104210b85f380d3237d3a2582f37 (diff) | |
| download | linux-next-9502b09933ed8debe9888c69b10e79e3a2b66800.tar.gz linux-next-9502b09933ed8debe9888c69b10e79e3a2b66800.zip | |
drm/amdgpu/jpeg: 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.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c index e0a71909252b..34c70270ea1d 100644 --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v5_0_0.c @@ -584,7 +584,7 @@ static int jpeg_v5_0_0_set_clockgating_state(struct amdgpu_ip_block *ip_block, enum amd_clockgating_state state) { struct amdgpu_device *adev = ip_block->adev; - bool enable = (state == AMD_CG_STATE_GATE) ? true : false; + bool enable = state == AMD_CG_STATE_GATE; if (enable) { if (!jpeg_v5_0_0_is_idle(ip_block)) |
