AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Yang Li <abaci-bugfix@linux.alibaba.com>, airlied@linux.ie
Cc: sunpeng.li@amd.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Yang Li <abaci-bugfix@linux.alibaba.com>,
	amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
	christian.koenig@amd.com
Subject: Re: [PATCH] drm/amd/display: Simplify bool comparison
Date: Thu, 14 Jan 2021 11:42:32 +0200	[thread overview]
Message-ID: <871renrh13.fsf@intel.com> (raw)
In-Reply-To: <1610530365-46152-1-git-send-email-abaci-bugfix@linux.alibaba.com>

On Wed, 13 Jan 2021, Yang Li <abaci-bugfix@linux.alibaba.com> wrote:
> 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 <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <abaci-bugfix@linux.alibaba.com>
> ---
>  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c
> index 4d3f7d5..904c2d2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c
> @@ -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);


>  
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2021-01-14  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  9:32 [PATCH] drm/amd/display: Simplify bool comparison Yang Li
2021-01-14  9:42 ` Jani Nikula [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-08 10:29 Jiapeng Chong
2021-02-09 19:41 ` Alex Deucher
2021-01-13  9:44 Yang Li
2021-01-14 17:45 ` Alex Deucher
2021-01-13  9:38 Yang Li
2021-01-13  9:08 Yang Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871renrh13.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=abaci-bugfix@linux.alibaba.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox