diff mbox series

[-next] drm/amdgpu/uvd7: remove unnecessary conversion to bool

Message ID 20200325023250.163321-1-chenzhou10@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] drm/amdgpu/uvd7: remove unnecessary conversion to bool | expand

Commit Message

chenzhou March 25, 2020, 2:32 a.m. UTC
The conversion to bool is not needed, remove it.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Deucher March 25, 2020, 5:51 p.m. UTC | #1
On Wed, Mar 25, 2020 at 4:17 AM Chen Zhou <chenzhou10@huawei.com> wrote:
>
> The conversion to bool is not needed, remove it.
>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> index 0995378..20f10a5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
> @@ -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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
index 0995378..20f10a5 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
@@ -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);