All of lore.kernel.org
 help / color / mirror / Atom feed
From: Clinton Taylor <Clinton.A.Taylor@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/3] drm/i915/display: use clk_off name to avoid double negation
Date: Wed, 11 Dec 2019 12:25:22 -0800	[thread overview]
Message-ID: <d60e6ec2-feb0-1dde-7574-29d284b6e114@intel.com> (raw)
In-Reply-To: <20191206071422.27138-2-lucas.demarchi@intel.com>


On 12/5/19 11:14 PM, Lucas De Marchi wrote:
> Instead of "ungated" use the same name for the variable as the bitfield,
> making it clearer what's the intent of the checks.
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_ddi.c | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 3433b0bf4f44..586a0019b9c7 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3012,12 +3012,10 @@ static void icl_sanitize_port_clk_off(struct drm_i915_private *dev_priv,
>   	val = I915_READ(ICL_DPCLKA_CFGCR0);
>   	for_each_port_masked(port, port_mask) {
>   		enum phy phy = intel_port_to_phy(dev_priv, port);
> +		bool ddi_clk_off = val & icl_dpclka_cfgcr0_clk_off(dev_priv,
> +								   phy);
>   
> -		bool ddi_clk_ungated = !(val &
> -					 icl_dpclka_cfgcr0_clk_off(dev_priv,
> -								   phy));
> -
> -		if (ddi_clk_needed == ddi_clk_ungated)
> +		if (ddi_clk_needed == !ddi_clk_off)
>   			continue;
>   
>   		/*

Sanity prevails.

Reviewed-by: Clint Taylor

-Clint


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-12-11 20:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06  7:14 [Intel-gfx] [PATCH 1/3] drm/i915/display: move clk off sanitize to its own function Lucas De Marchi
2019-12-06  7:14 ` [Intel-gfx] [PATCH 2/3] drm/i915/display: use clk_off name to avoid double negation Lucas De Marchi
2019-12-11 20:25   ` Clinton Taylor [this message]
2019-12-06  7:14 ` [Intel-gfx] [PATCH 3/3] drm/i915/display: fix phy name Lucas De Marchi
2019-12-11 17:08   ` Clinton Taylor
2019-12-06  8:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/display: move clk off sanitize to its own function Patchwork
2019-12-06 19:23 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2019-12-06 22:57   ` Lucas De Marchi
2019-12-11 20:24 ` [Intel-gfx] [PATCH 1/3] " Clinton Taylor

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=d60e6ec2-feb0-1dde-7574-29d284b6e114@intel.com \
    --to=clinton.a.taylor@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.