Skip to contentSkip to conversation

drm/amdgpu/uvd7: remove unnecessary conversion to bool

PATCH Applied Chen Zhou 2 participants 2 messages Mar 25, 2020

Subsystems (2)
lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 drm/amdgpu/uvd7: remove unnecessary conversion to bool

The conversion to bool is not needed, remove it.

---
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1 -1
index 0995378..20f10a5 100644
@@ -1694,7 +1694,7 @@ static int uvd_v7_0_set_clockgating_state(void *handle,
 					  enum amd_clockgating_state state)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-	bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
+	bool enable = (state == AMD_CG_STATE_GATE);
 
 	uvd_v7_0_set_bypass_mode(adev, enable);
 
Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 4 lines · Chen Zhou

The conversion to bool is not needed, remove it.

Applied. Thanks!

Alex

Quoted 20 lines
---
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c +1 -2
index 0995378..20f10a5 100644
@@ -1694,7 +1694,7 @@ static int uvd_v7_0_set_clockgating_state(void *handle,
                                          enum amd_clockgating_state state)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
-       bool enable = (state == AMD_CG_STATE_GATE) ? true : false;
+       bool enable = (state == AMD_CG_STATE_GATE);
 
        uvd_v7_0_set_bypass_mode(adev, enable);
 
--

2.7.4

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel