Skip to contentSkip to conversation

drm/amd/display: Simplify bool comparison

PATCH Applied Yang Li 2 participants 2 messages Jan 13, 2021 – Jan 14, 2021

Subsystems (4)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 drm/amd/display: Simplify bool comparison

Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c:3141:30-39:
WARNING: Comparison to bool

---
 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c +1 -1
index 45f0289..f33e3de 100644
@@ -3138,7 +3138,7 @@ static void CalculateFlipSchedule(
 				4.0 * (TimeForFetchingMetaPTEImmediateFlip / LineTime + 0.125),
 				1) / 4.0;
 
-		if ((GPUVMEnable == true || DCCEnable == true)) {
+		if ((GPUVMEnable || DCCEnable)) {
 			mode_lib->vba.ImmediateFlipBW[0] = BandwidthAvailableForImmediateFlip
 					* ImmediateFlipBytes / TotImmediateFlipBytes;
 			TimeForFetchingRowInVBlankImmediateFlip = dml_max(
Signature · 1 line
1.8.3.1
Applied
#1 lore raw
Quoted 7 lines · Yang Li

Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c:3141:30-39:
WARNING: Comparison to bool

Applied all 4 patches. Thanks!

Alex

Quoted 20 lines
---
 drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c +1 -2
index 45f0289..f33e3de 100644
@@ -3138,7 +3138,7 @@ static void CalculateFlipSchedule(
                                4.0 * (TimeForFetchingMetaPTEImmediateFlip / LineTime + 0.125),
                                1) / 4.0;
 
-               if ((GPUVMEnable == true || DCCEnable == true)) {
+               if ((GPUVMEnable || DCCEnable)) {
                        mode_lib->vba.ImmediateFlipBW[0] = BandwidthAvailableForImmediateFlip
                                        * ImmediateFlipBytes / TotImmediateFlipBytes;
                        TimeForFetchingRowInVBlankImmediateFlip = dml_max(
--

1.8.3.1

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx