]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amd/display: remove duplicated argument
authorJosé Pekkarinen <jose.pekkarinen@foxhound.fi>
Sun, 29 Oct 2023 09:39:26 +0000 (11:39 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Nov 2023 22:02:38 +0000 (17:02 -0500)
Spotted by coccicheck, there is a redundant check for
v->SourcePixelFormat[k] != dm_444_16. This patch will
remove it. The corresponding output follows.

drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c:5130:86-122: duplicated argument to && or ||

Signed-off-by: José Pekkarinen <jose.pekkarinen@foxhound.fi>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c

index ad741a723c0e8a697a5fd1ad98d3d38d9eddbf58..3686f1e7de3abf659e2e60f117d7992d1da95915 100644 (file)
@@ -5128,7 +5128,7 @@ void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                        ViewportExceedsSurface = true;
 
                if (v->SourcePixelFormat[k] != dm_444_64 && v->SourcePixelFormat[k] != dm_444_32 && v->SourcePixelFormat[k] != dm_444_16
-                               && v->SourcePixelFormat[k] != dm_444_16 && v->SourcePixelFormat[k] != dm_444_8 && v->SourcePixelFormat[k] != dm_rgbe) {
+                               && v->SourcePixelFormat[k] != dm_444_8 && v->SourcePixelFormat[k] != dm_rgbe) {
                        if (v->ViewportWidthChroma[k] > v->SurfaceWidthC[k] || v->ViewportHeightChroma[k] > v->SurfaceHeightC[k]) {
                                ViewportExceedsSurface = true;
                        }