Skip to contentSkip to conversation

drm/amd/display: Remove unnecessary conversion to bool

PATCH Applied Jiapeng Chong 2 participants 2 messages Mar 16, 2021 – Mar 18, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Remove unnecessary conversion to bool

Fix the following coccicheck warnings:

./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:721:65-70: WARNING:
conversion to bool not needed here.

./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:1139:67-72: WARNING:
conversion to bool not needed here.

---
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c +2 -2
index 6e864b1..434d3c4 100644
@@ -718,7 +718,7 @@ bool dpp3_program_blnd_lut(
 		next_mode = LUT_RAM_B;
 
 	dpp3_power_on_blnd_lut(dpp_base, true);
-	dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+	dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
 
 	if (next_mode == LUT_RAM_A)
 		dpp3_program_blnd_luta_settings(dpp_base, params);
@@ -1136,7 +1136,7 @@ bool dpp3_program_shaper(
 	else
 		next_mode = LUT_RAM_A;
 
-	dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+	dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
 
 	if (next_mode == LUT_RAM_A)
 		dpp3_program_shaper_luta_settings(dpp_base, params);
Signature · 6 lines
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Applied
#1 lore raw
Quoted 11 lines · Jiapeng Chong

Fix the following coccicheck warnings:

./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:721:65-70: WARNING:
conversion to bool not needed here.

./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:1139:67-72: WARNING:
conversion to bool not needed here.

Applied. Thanks!

Alex

Quoted 29 lines
---
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c +2 -3
index 6e864b1..434d3c4 100644
@@ -718,7 +718,7 @@ bool dpp3_program_blnd_lut(
                next_mode = LUT_RAM_B;
 
        dpp3_power_on_blnd_lut(dpp_base, true);
-       dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+       dpp3_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
 
        if (next_mode == LUT_RAM_A)
                dpp3_program_blnd_luta_settings(dpp_base, params);
@@ -1136,7 +1136,7 @@ bool dpp3_program_shaper(
        else
                next_mode = LUT_RAM_A;
 
-       dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+       dpp3_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
 
        if (next_mode == LUT_RAM_A)
                dpp3_program_shaper_luta_settings(dpp_base, params);
--

1.8.3.1

Quoted 4 lines

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

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