diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-31 08:30:43 +0200 |
---|---|---|
committer | Dongkyun Son <dongkyun.s@samsung.com> | 2019-12-26 12:51:35 +0900 |
commit | 3384a409183653d0736b91d0dd68675acea0104e (patch) | |
tree | acc8647aca969a993bdde28edfc1a7bf3b72c5ad | |
parent | f888981c97e432fa251bbd351ecb31b726a9c702 (diff) | |
download | emulator-kernel-3384a409183653d0736b91d0dd68675acea0104e.tar.gz emulator-kernel-3384a409183653d0736b91d0dd68675acea0104e.tar.bz2 emulator-kernel-3384a409183653d0736b91d0dd68675acea0104e.zip |
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>
[dongkyun.s: cherry-pick stable linux-4.4.y commit c81c4d453edf for gcc 9 build]
Change-Id: I6094687ed5887de09f25175c1be63422651fcd03
-rw-r--r-- | drivers/gpu/drm/i915/intel_uncore.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index cc91ae832ffb..6fd7b50c5747 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -635,7 +635,8 @@ hsw_unclaimed_reg_detect(struct drm_i915_private *dev_priv) "enabling oneshot unclaimed register reporting. " "Please use i915.mmio_debug=N for more information.\n"); __raw_i915_write32(dev_priv, FPGA_DBG, FPGA_DBG_RM_NOCLAIM); - i915.mmio_debug = mmio_debug_once--; + i915.mmio_debug = mmio_debug_once; + mmio_debug_once = false; } } |