drm/amd/display: Simplify bool comparison
Subsystems (3)
PATCH 1/1 drm/amd/display: Simplify bool comparison
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c:580:23-31:
WARNING: Comparison to bool
Reported-by Abaci Robot <[email protected]>
Signed-off-by Yang Li <[email protected]>
--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +1 -1
@@ -577,7 +577,7 @@ void dpp1_power_on_degamma_lut(struct dcn10_dpp *dpp =TO_DCN10_DPP (dpp_base);REG_SET (CM_MEM_PWR_CTRL ,0 , -SHARED_MEM_PWR_DIS , power_on == true ?0 :1 ); +SHARED_MEM_PWR_DIS , power_on ?0 :1 ); }
Signature · 1 line
1.8.3.1
Quoted 15 lines · Yang Li
Fix the following coccicheck warning:
./drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c:580:23-31:
WARNING: Comparison to boolReported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>--- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +0
-0
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c void dpp1_power_on_degamma_lut( · line 580
Quoted 5 lines
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +1
-1@@ -577,7 +577,7 @@ void dpp1_power_on_degamma_lut(struct dcn10_dpp *dpp =TO_DCN10_DPP (dpp_base);REG_SET (CM_MEM_PWR_CTRL ,0 , -SHARED_MEM_PWR_DIS , power_on == true ?0 :1 ); +SHARED_MEM_PWR_DIS , power_on ?0 :1 );
Not my driver, but this is as simple as it gets:
+ SHARED_MEM_PWR_DIS, !power_on);
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c +0
-0}
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel