[PATCH] drm/amd/display: Remove unnecessary conversion to bool

Alex Deucher alexdeucher at gmail.com
Tue Mar 2 18:21:52 UTC 2021


Applied.  Thanks!

Alex

On Mon, Mar 1, 2021 at 1:50 AM Jiapeng Chong
<jiapeng.chong at linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:298:33-38:
> WARNING: conversion to bool not needed here.
>
> Reported-by: Abaci Robot <abaci at linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong at linux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> index 3398540..fbefbba 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c
> @@ -295,7 +295,7 @@ bool dpp3_program_gamcor_lut(
>         cm_helper_program_gamcor_xfer_func(dpp_base->ctx, params, &gam_regs);
>
>         dpp3_program_gammcor_lut(dpp_base, params->rgb_resulted, params->hw_points_num,
> -                       next_mode == LUT_RAM_A ? true:false);
> +                                next_mode == LUT_RAM_A);
>
>         //select Gamma LUT to use for next frame
>         REG_UPDATE(CM_GAMCOR_CONTROL, CM_GAMCOR_SELECT, next_mode == LUT_RAM_A ? 0:1);
> --
> 1.8.3.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the amd-gfx mailing list