Skip to content

Commit c81c4d4

Browse files
committed
drm/i915: fix compiler warning in drivers/gpu/drm/i915/intel_uncore.c
When building with gcc-7, the following warning happens: drivers/gpu/drm/i915/intel_uncore.c: In function ‘hsw_unclaimed_reg_detect’: drivers/gpu/drm/i915/intel_uncore.c:638:36: warning: decrement of a boolean expression [-Wbool-operation] i915.mmio_debug = mmio_debug_once--; ^~ As it's really not wise to -- on a boolean value. Commit 7571494004d8 ("drm/i915: Do one shot unclaimed mmio detection less frequently") which showed up in 4.6-rc1 does solve this issue, by rewriting the mmio detection logic, but that isn't really good to backport to 4.4-stable, so just fix up the obvious logic here to do the right thing. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Paulo Zanoni <przanoni@gmail.com> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b757162 commit c81c4d4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/gpu/drm/i915/intel_uncore.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,8 @@ hsw_unclaimed_reg_detect(struct drm_i915_private *dev_priv)
635635
"enabling oneshot unclaimed register reporting. "
636636
"Please use i915.mmio_debug=N for more information.\n");
637637
__raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
638-
i915.mmio_debug = mmio_debug_once--;
638+
i915.mmio_debug = mmio_debug_once;
639+
mmio_debug_once = false;
639640
}
640641
}
641642

0 commit comments

Comments
 (0)