lkml.org 
[lkml]   [2020]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
From
Date
Am 27.04.20 um 08:36 schrieb Jason Yan:
> The '>' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3d601d5dd5af..ad94de3632d8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
>
> adev->gfx.gfx_off_req_count = 1;
> - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
>
> /* Registers mapping */
> /* TODO: block userspace mapping of io register */

\
 
 \ /
  Last update: 2020-04-27 10:03    [W:0.142 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site