drm/amd/display: Remove useless else if
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Thu, 12 Jan 2023 03:20:49 +0000 (11:20 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Jan 2023 19:54:35 +0000 (14:54 -0500)
The assignment of the else and if branches is the same, so the if else
here is redundant, so we remove it.

./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1951:2-4: WARNING: possible condition with no effect (if == else).

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3719
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 3e84d557b41b3440325212d8bca743360a926618..23ed2e1da16d4c46ed54a1bdee445579d54329fd 100644 (file)
@@ -1948,10 +1948,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
                dmub_asic = DMUB_ASIC_DCN21;
                break;
        case IP_VERSION(3, 0, 0):
-               if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 0))
-                       dmub_asic = DMUB_ASIC_DCN30;
-               else
-                       dmub_asic = DMUB_ASIC_DCN30;
+               dmub_asic = DMUB_ASIC_DCN30;
                break;
        case IP_VERSION(3, 0, 1):
                dmub_asic = DMUB_ASIC_DCN301;