drm/amd/amdgpu: fix comparison pointer to bool warning in sdma_v4_0.c
authorZheng Bin <zhengbin13@huawei.com>
Wed, 9 Sep 2020 13:07:20 +0000 (21:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Sep 2020 21:52:43 +0000 (17:52 -0400)
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1003:4-9: WARNING: Comparison to bool
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:1083:5-11: WARNING: Comparison to bool

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Zheng Bin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c

index edea874..810635c 100644 (file)
@@ -1000,7 +1000,7 @@ static void sdma_v4_0_page_stop(struct amdgpu_device *adev)
                sdma[i] = &adev->sdma.instance[i].page;
 
                if ((adev->mman.buffer_funcs_ring == sdma[i]) &&
-                       (unset == false)) {
+                       (!unset)) {
                        amdgpu_ttm_set_buffer_funcs_status(adev, false);
                        unset = true;
                }
@@ -1089,7 +1089,7 @@ static void sdma_v4_0_enable(struct amdgpu_device *adev, bool enable)
        u32 f32_cntl;
        int i;
 
-       if (enable == false) {
+       if (!enable) {
                sdma_v4_0_gfx_stop(adev);
                sdma_v4_0_rlc_stop(adev);
                if (adev->sdma.has_page_queue)