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>
} else
busy = false;
} else {
} else
busy = false;
} else {
/* We always increment the hangcheck score
* if the ring is busy and still processing
* the same request, so that no single request
/* We always increment the hangcheck score
* if the ring is busy and still processing
* the same request, so that no single request
switch (ring->hangcheck.action) {
case HANGCHECK_WAIT:
switch (ring->hangcheck.action) {
case HANGCHECK_WAIT:
break;
case HANGCHECK_ACTIVE:
break;
case HANGCHECK_ACTIVE:
+ ring->hangcheck.score += BUSY;
break;
case HANGCHECK_KICK:
break;
case HANGCHECK_KICK:
+ ring->hangcheck.score += KICK;
break;
case HANGCHECK_HUNG:
break;
case HANGCHECK_HUNG:
+ ring->hangcheck.score += HUNG;
stuck[i] = true;
break;
}
stuck[i] = true;
break;
}
- ring->hangcheck.score += score;
}
} else {
/* Gradually reduce the count so that we catch DoS
}
} else {
/* Gradually reduce the count so that we catch DoS