]> git.itanic.dy.fi Git - linux-stable/commit
drm/i915: fix compiler warning in drivers/gpu/drm/i915/intel_uncore.c
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 06:30:43 +0000 (08:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Sep 2017 05:06:53 +0000 (07:06 +0200)
commitc81c4d453edf242af644f7e71f673fc7632f337c
tree04ec5a392d31617bdbcd085f2a34b774545245fb
parentb7571624fe986aecc7f42b421286f90cd7c67d6e
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>
drivers/gpu/drm/i915/intel_uncore.c