drm/amdgpu: use true, false for bool variable in mxgpu_ai.c
authorzhengbin <zhengbin13@huawei.com>
Mon, 23 Dec 2019 13:46:17 +0000 (21:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 23 Dec 2019 20:00:00 +0000 (15:00 -0500)
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:253:2-20: WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:265:2-20: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c

index 43305afa3d6f6f8bfc6b41b121f6a9e4b8cdee03..5fd67e1cc2a0465ef469434d29e2585ffcd042f0 100644 (file)
@@ -250,7 +250,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
         */
        locked = mutex_trylock(&adev->lock_reset);
        if (locked)
-               adev->in_gpu_reset = 1;
+               adev->in_gpu_reset = true;
 
        do {
                if (xgpu_ai_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
@@ -262,7 +262,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
 
 flr_done:
        if (locked) {
-               adev->in_gpu_reset = 0;
+               adev->in_gpu_reset = false;
                mutex_unlock(&adev->lock_reset);
        }