[Intel-gfx] [PATCH 4/5] drm/i915: Clean up some expressions
Jani Nikula
jani.nikula at linux.intel.com
Tue Jun 20 13:46:43 UTC 2017
On Tue, 20 Jun 2017, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Write the '!(SNB||IVB)' checks in the CPT/PPT detections
> as '!SNB && !IVB' to make it less messy looking, and clear out
> some useless parens the from the virtualization PCH detection case.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Patches 1-4
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index aa99619bfc1b..1681be8d21f6 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -185,15 +185,15 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)
> dev_priv->pch_id = id;
> dev_priv->pch_type = PCH_CPT;
> DRM_DEBUG_KMS("Found CougarPoint PCH\n");
> - WARN_ON(!(IS_GEN6(dev_priv) ||
> - IS_IVYBRIDGE(dev_priv)));
> + WARN_ON(!IS_GEN6(dev_priv) &&
> + !IS_IVYBRIDGE(dev_priv));
> } else if (id == INTEL_PCH_PPT_DEVICE_ID_TYPE) {
> /* PantherPoint is CPT compatible */
> dev_priv->pch_id = id;
> dev_priv->pch_type = PCH_CPT;
> DRM_DEBUG_KMS("Found PantherPoint PCH\n");
> - WARN_ON(!(IS_GEN6(dev_priv) ||
> - IS_IVYBRIDGE(dev_priv)));
> + WARN_ON(!IS_GEN6(dev_priv) &&
> + !IS_IVYBRIDGE(dev_priv));
> } else if (id == INTEL_PCH_LPT_DEVICE_ID_TYPE) {
> dev_priv->pch_id = id;
> dev_priv->pch_type = PCH_LPT;
> @@ -240,9 +240,9 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)
> DRM_DEBUG_KMS("Found CannonPoint LP PCH\n");
> WARN_ON(!IS_CANNONLAKE(dev_priv) &&
> !IS_COFFEELAKE(dev_priv));
> - } else if ((id == INTEL_PCH_P2X_DEVICE_ID_TYPE) ||
> - (id == INTEL_PCH_P3X_DEVICE_ID_TYPE) ||
> - ((id == INTEL_PCH_QEMU_DEVICE_ID_TYPE) &&
> + } else if (id == INTEL_PCH_P2X_DEVICE_ID_TYPE ||
> + id == INTEL_PCH_P3X_DEVICE_ID_TYPE ||
> + (id == INTEL_PCH_QEMU_DEVICE_ID_TYPE &&
> pch->subsystem_vendor ==
> PCI_SUBVENDOR_ID_REDHAT_QUMRANET &&
> pch->subsystem_device ==
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list