diff mbox series

[1/1] drm/amd/display: Delete several unneeded bool conversions

Message ID 20210510121621.3692-1-thunder.leizhen@huawei.com
State Accepted
Commit ea23ff0241f094aa67d74ea37b2189ac1bf17f6b
Headers show
Series [1/1] drm/amd/display: Delete several unneeded bool conversions | expand

Commit Message

Zhen Lei May 10, 2021, 12:16 p.m. UTC
The result of an expression consisting of a single relational operator is
already of the bool type and does not need to be evaluated explicitly.

No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++--
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.26.0.106.g9fadedd

Comments

Alex Deucher May 10, 2021, 9:25 p.m. UTC | #1
Applied.  Thanks!

Alex

On Mon, May 10, 2021 at 8:16 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>

> The result of an expression consisting of a single relational operator is

> already of the bool type and does not need to be evaluated explicitly.

>

> No functional change.

>

> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>

> ---

>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++--

>  drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c    | 2 +-

>  2 files changed, 3 insertions(+), 3 deletions(-)

>

> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c

> index 8dc3d1f7398422e..2feb051a200294a 100644

> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c

> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c

> @@ -482,7 +482,7 @@ bool dpp20_program_blnd_lut(

>                 next_mode = LUT_RAM_A;

>

>         dpp20_power_on_blnd_lut(dpp_base, true);

> -       dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);

> +       dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);

>

>         if (next_mode == LUT_RAM_A)

>                 dpp20_program_blnd_luta_settings(dpp_base, params);

> @@ -893,7 +893,7 @@ bool dpp20_program_shaper(

>         else

>                 next_mode = LUT_RAM_A;

>

> -       dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);

> +       dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);

>

>         if (next_mode == LUT_RAM_A)

>                 dpp20_program_shaper_luta_settings(dpp_base, params);

> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c

> index 910c17fd4278932..950c9bfd53de516 100644

> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c

> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c

> @@ -874,7 +874,7 @@ bool mpc3_program_shaper(

>         else

>                 next_mode = LUT_RAM_A;

>

> -       mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);

> +       mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);

>

>         if (next_mode == LUT_RAM_A)

>                 mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);

> --

> 2.26.0.106.g9fadedd

>

>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
index 8dc3d1f7398422e..2feb051a200294a 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c
@@ -482,7 +482,7 @@  bool dpp20_program_blnd_lut(
 		next_mode = LUT_RAM_A;
 
 	dpp20_power_on_blnd_lut(dpp_base, true);
-	dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+	dpp20_configure_blnd_lut(dpp_base, next_mode == LUT_RAM_A);
 
 	if (next_mode == LUT_RAM_A)
 		dpp20_program_blnd_luta_settings(dpp_base, params);
@@ -893,7 +893,7 @@  bool dpp20_program_shaper(
 	else
 		next_mode = LUT_RAM_A;
 
-	dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A ? true:false);
+	dpp20_configure_shaper_lut(dpp_base, next_mode == LUT_RAM_A);
 
 	if (next_mode == LUT_RAM_A)
 		dpp20_program_shaper_luta_settings(dpp_base, params);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
index 910c17fd4278932..950c9bfd53de516 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c
@@ -874,7 +874,7 @@  bool mpc3_program_shaper(
 	else
 		next_mode = LUT_RAM_A;
 
-	mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A ? true:false, rmu_idx);
+	mpc3_configure_shaper_lut(mpc, next_mode == LUT_RAM_A, rmu_idx);
 
 	if (next_mode == LUT_RAM_A)
 		mpc3_program_shaper_luta_settings(mpc, params, rmu_idx);