drm/amd/display: use true, false for bool variable in display_mode_vba_21.c
authorzhengbin <zhengbin13@huawei.com>
Tue, 24 Dec 2019 03:27:39 +0000 (11:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Jan 2020 16:56:29 +0000 (11:56 -0500)
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4124:3-28: WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4128:5-30: WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:5207:3-37: WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c

index 945291d..b6d3466 100644 (file)
@@ -4121,11 +4121,11 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
        }
        for (i = 0; i <= mode_lib->vba.soc.num_states; i++) {
                for (k = 0; k <= mode_lib->vba.NumberOfActivePlanes - 1; k++) {
-                       locals->RequiresDSC[i][k] = 0;
+                       locals->RequiresDSC[i][k] = false;
                        locals->RequiresFEC[i][k] = 0;
                        if (mode_lib->vba.BlendingAndTiming[k] == k) {
                                if (mode_lib->vba.Output[k] == dm_hdmi) {
-                                       locals->RequiresDSC[i][k] = 0;
+                                       locals->RequiresDSC[i][k] = false;
                                        locals->RequiresFEC[i][k] = 0;
                                        locals->OutputBppPerState[i][k] = TruncToValidBPP(
                                                        dml_min(600.0, mode_lib->vba.PHYCLKPerState[i]) / mode_lib->vba.PixelClockBackEnd[k] * 24,
@@ -5204,7 +5204,7 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
                        mode_lib->vba.ODMCombineEnabled[k] =
                                        locals->ODMCombineEnablePerState[mode_lib->vba.VoltageLevel][k];
                } else {
-                       mode_lib->vba.ODMCombineEnabled[k] = 0;
+                       mode_lib->vba.ODMCombineEnabled[k] = false;
                }
                mode_lib->vba.DSCEnabled[k] =
                                locals->RequiresDSC[mode_lib->vba.VoltageLevel][k];