drm/i915: drop unnecessary local variable to suppress build warning
Although I could not reproduce this (different compiler version, perhaps), reportedly we get: drivers/gpu/drm/i915/i915_irq.c:1943:27: warning: ‘score’ may be used uninitialized in this function [-Wuninitialized] Drop the 'score' variable altogether as it's not really needed. Reported-by: Kees Cook <keescook@chromium.org> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
f2f4d82faf
commit
ea04cb31d5
|
@ -1905,8 +1905,6 @@ static void i915_hangcheck_elapsed(unsigned long data)
|
||||||
} else
|
} else
|
||||||
busy = false;
|
busy = false;
|
||||||
} else {
|
} else {
|
||||||
int score;
|
|
||||||
|
|
||||||
/* We always increment the hangcheck score
|
/* We always increment the hangcheck score
|
||||||
* if the ring is busy and still processing
|
* if the ring is busy and still processing
|
||||||
* the same request, so that no single request
|
* the same request, so that no single request
|
||||||
|
@ -1927,20 +1925,18 @@ static void i915_hangcheck_elapsed(unsigned long data)
|
||||||
|
|
||||||
switch (ring->hangcheck.action) {
|
switch (ring->hangcheck.action) {
|
||||||
case HANGCHECK_WAIT:
|
case HANGCHECK_WAIT:
|
||||||
score = 0;
|
|
||||||
break;
|
break;
|
||||||
case HANGCHECK_ACTIVE:
|
case HANGCHECK_ACTIVE:
|
||||||
score = BUSY;
|
ring->hangcheck.score += BUSY;
|
||||||
break;
|
break;
|
||||||
case HANGCHECK_KICK:
|
case HANGCHECK_KICK:
|
||||||
score = KICK;
|
ring->hangcheck.score += KICK;
|
||||||
break;
|
break;
|
||||||
case HANGCHECK_HUNG:
|
case HANGCHECK_HUNG:
|
||||||
score = HUNG;
|
ring->hangcheck.score += HUNG;
|
||||||
stuck[i] = true;
|
stuck[i] = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ring->hangcheck.score += score;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Gradually reduce the count so that we catch DoS
|
/* Gradually reduce the count so that we catch DoS
|
||||||
|
|
Loading…
Reference in New Issue