drivers/amdgpu: Use canonical form in branch predicates
authorEdward O'Callaghan <funfunctor@folklore1984.net>
Tue, 12 Jul 2016 00:17:53 +0000 (10:17 +1000)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 29 Jul 2016 18:36:48 +0000 (14:36 -0400)
Found-by: Coccinelle
Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
drivers/gpu/drm/amd/amdgpu/ci_dpm.c
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

index 99ca75baa47d7b8e018a856936fffd016d808742..2b6afe123f3d90acce64b35325da1f1e9dbd1fa6 100644 (file)
@@ -352,22 +352,22 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
        uint16_t tmp, bios_header_start;
 
        r = amdgpu_atrm_get_bios(adev);
-       if (r == false)
+       if (!r)
                r = amdgpu_acpi_vfct_bios(adev);
-       if (r == false)
+       if (!r)
                r = igp_read_bios_from_vram(adev);
-       if (r == false)
+       if (!r)
                r = amdgpu_read_bios(adev);
-       if (r == false) {
+       if (!r) {
                r = amdgpu_read_bios_from_rom(adev);
        }
-       if (r == false) {
+       if (!r) {
                r = amdgpu_read_disabled_bios(adev);
        }
-       if (r == false) {
+       if (!r) {
                r = amdgpu_read_platform_bios(adev);
        }
-       if (r == false || adev->bios == NULL) {
+       if (!r || adev->bios == NULL) {
                DRM_ERROR("Unable to locate a BIOS ROM\n");
                adev->bios = NULL;
                return false;
index 573bc973d6921a7f11dc96ab698fabb43fc81fce..42a59fc60b2a48900cc116cecb76e7bc08772f31 100644 (file)
@@ -3034,7 +3034,7 @@ static int ci_populate_single_memory_level(struct amdgpu_device *adev,
 
        if (pi->mclk_stutter_mode_threshold &&
            (memory_clock <= pi->mclk_stutter_mode_threshold) &&
-           (pi->uvd_enabled == false) &&
+           (!pi->uvd_enabled) &&
            (RREG32(mmDPG_PIPE_STUTTER_CONTROL) & DPG_PIPE_STUTTER_CONTROL__STUTTER_ENABLE_MASK) &&
            (adev->pm.dpm.new_active_crtc_count <= 2))
                memory_level->StutterEnable = true;
index a7de4d18ac946c2f8da67ba16664ed6f956c985f..4efc901f658c0e60d1d6e96a11bb083e761c4140 100644 (file)
@@ -879,7 +879,7 @@ static void cik_vga_set_state(struct amdgpu_device *adev, bool state)
        uint32_t tmp;
 
        tmp = RREG32(mmCONFIG_CNTL);
-       if (state == false)
+       if (!state)
                tmp |= CONFIG_CNTL__VGA_DIS_MASK;
        else
                tmp &= ~CONFIG_CNTL__VGA_DIS_MASK;
index 6507a7ee75e4c09457772183c9a88217f5d79392..c1eedc4665269063b654780f7e9c3665f95f61c5 100644 (file)
@@ -354,7 +354,7 @@ static void cik_sdma_enable(struct amdgpu_device *adev, bool enable)
        u32 me_cntl;
        int i;
 
-       if (enable == false) {
+       if (!enable) {
                cik_sdma_gfx_stop(adev);
                cik_sdma_rlc_stop(adev);
        }
index 0111d153411b572e156652ec89b2cc6cc89cdaca..9d43c6ca37e6436001c1c349295d191f7c5e4443 100644 (file)
@@ -393,7 +393,7 @@ static void sdma_v2_4_enable(struct amdgpu_device *adev, bool enable)
        u32 f32_cntl;
        int i;
 
-       if (enable == false) {
+       if (!enable) {
                sdma_v2_4_gfx_stop(adev);
                sdma_v2_4_rlc_stop(adev);
        }
index 2b8ce5808a14ac36c9a4ee8992116cd4a25040cc..4debd0dc47d868b22de8b5f14ddb4a8ed2325e57 100644 (file)
@@ -604,7 +604,7 @@ static void sdma_v3_0_enable(struct amdgpu_device *adev, bool enable)
        u32 f32_cntl;
        int i;
 
-       if (enable == false) {
+       if (!enable) {
                sdma_v3_0_gfx_stop(adev);
                sdma_v3_0_rlc_stop(adev);
        }