drm/amd/display: Simplify bool conversion
authorYang Li <yang.lee@linux.alibaba.com>
Thu, 1 Sep 2022 08:11:31 +0000 (16:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 18:32:58 +0000 (14:32 -0400)
The result of relational operation is Boolean, and the question mark
expression is redundant.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2027
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c

index dc501ee..e4fd540 100644 (file)
@@ -1873,7 +1873,7 @@ void dml32_CalculateSurfaceSizeInMall(
                if (UseMALLForStaticScreen[k] == dm_use_mall_static_screen_enable)
                        TotalSurfaceSizeInMALL = TotalSurfaceSizeInMALL + SurfaceSizeInMALL[k];
        }
-       *ExceededMALLSize =  (TotalSurfaceSizeInMALL <= MALLAllocatedForDCN * 1024 * 1024 ? false : true);
+       *ExceededMALLSize =  (TotalSurfaceSizeInMALL > MALLAllocatedForDCN * 1024 * 1024);
 } // CalculateSurfaceSizeInMall
 
 void dml32_CalculateVMRowAndSwath(