mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2026-01-27 12:47:24 +01:00
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>
This commit is contained in:
parent
8a4bc4508c
commit
9502b09933
|
|
@ -686,7 +686,7 @@ static int jpeg_v4_0_5_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;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < adev->jpeg.num_jpeg_inst; ++i) {
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -697,7 +697,7 @@ static int jpeg_v5_0_1_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;
|
||||
|
||||
int i;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user