From: Jani Nikula Date: Fri, 13 May 2016 14:04:38 +0000 (+0300) Subject: drm/i915: don't mix bitwise and logical operations for has_snoop X-Git-Tag: v4.9.8~1605^2~45^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8fcdf1e65c71340972041295fb7b3e59929b761;p=platform%2Fkernel%2Flinux-rpi3.git drm/i915: don't mix bitwise and logical operations for has_snoop Also make the code more readable. Reviewed-by: Tvrtko Ursulin Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1463148278-23193-2-git-send-email-jani.nikula@intel.com --- diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 547100f..a8c79f6 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -954,9 +954,11 @@ static void intel_device_info_runtime_init(struct drm_device *dev) else if (INTEL_INFO(dev)->gen >= 9) gen9_sseu_info_init(dev); - /* Snooping is broken on BXT A stepping. */ info->has_snoop = !info->has_llc; - info->has_snoop &= !IS_BXT_REVID(dev, 0, BXT_REVID_A1); + + /* Snooping is broken on BXT A stepping. */ + if (IS_BXT_REVID(dev, 0, BXT_REVID_A1)) + info->has_snoop = false; DRM_DEBUG_DRIVER("slice total: %u\n", info->slice_total); DRM_DEBUG_DRIVER("subslice total: %u\n", info->subslice_total);