aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <[email protected]>2015-02-11 18:21:43 +0000
committerDaniel Vetter <[email protected]>2015-02-13 23:28:39 +0100
commit35c8ce6ac5c2efedf76912c86b2021a6e4ec1655 (patch)
tree9168066e963cf7ad669a2fb29e073721cd138293
parent77719d28aeed5cad45b61d66b198b2575a5bf4cc (diff)
drm/i915/skl: Fix always true comparison in a revision id check
It's always a good idea to keep static analysis happy (also because it prompts doing the check like I proposed :), this time smatch complains: drivers/gpu/drm/i915/intel_ringbuffer.c:891 gen9_init_workarounds() warn: always true condition '((->dev->pdev->revision) >= (0)) => (0-255 >= 0)' That's because revision is a u8. Tweak a bit the condition then. Cc: Nick Hoath <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Nick Hoath <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index e9a85a575a1c..ab8ce4ceed2e 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -957,8 +957,8 @@ static int gen9_init_workarounds(struct intel_engine_cs *ring)
WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3,
GEN9_DISABLE_OCL_OOB_SUPPRESS_LOGIC);
- if (INTEL_REVID(dev) >= SKL_REVID_A0 &&
- INTEL_REVID(dev) <= SKL_REVID_B0) {
+ if (INTEL_REVID(dev) == SKL_REVID_A0 ||
+ INTEL_REVID(dev) == SKL_REVID_B0) {
/*
* WaDisableDgMirrorFixInHalfSliceChicken5:skl
* This is a pre-production w/a.