From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/3] drm/i915/display: use clk_off name to avoid double negation
Date: Thu, 5 Dec 2019 23:14:21 -0800 [thread overview]
Message-ID: <20191206071422.27138-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20191206071422.27138-1-lucas.demarchi@intel.com>
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;
/*
--
2.24.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-12-06 7:14 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 ` Lucas De Marchi [this message]
2019-12-11 20:25 ` [Intel-gfx] [PATCH 2/3] drm/i915/display: use clk_off name to avoid double negation Clinton Taylor
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=20191206071422.27138-2-lucas.demarchi@intel.com \
--to=lucas.demarchi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox