amd/display/dc: remove repeating expression
authorWang Ming <machel@vivo.com>
Wed, 14 Jun 2023 03:49:23 +0000 (11:49 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Jun 2023 19:31:42 +0000 (15:31 -0400)
Identify issues that arise by using the tests/doubletest.cocci
semantic patch. Need to remove duplicate expression in if statement.

Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c

index f115394..df3a438 100644 (file)
@@ -1610,7 +1610,7 @@ static int source_format_to_bpp (enum source_format_class SourcePixelFormat)
 {
        if (SourcePixelFormat == dm_444_64)
                return 8;
-       else if (SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16)
+       else if (SourcePixelFormat == dm_444_16)
                return 2;
        else if (SourcePixelFormat == dm_444_8)
                return 1;