diff options
author | Jani Nikula <jani.nikula@intel.com> | 2013-08-11 05:44:02 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-22 07:31:38 -0400 |
commit | ea04cb31d506ac3f4fc3cefb1c50eb4f35ab37fd (patch) | |
tree | 19f7623a4694c0794e6905d37751537dba3f5497 /drivers/gpu/drm/i915/i915_irq.c | |
parent | f2f4d82faf85d2e53a2ba00a831a9f7f80b7e6e7 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_irq.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 06659a72d0cf..28d57477aa42 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -1905,8 +1905,6 @@ static void i915_hangcheck_elapsed(unsigned long data) | |||
1905 | } else | 1905 | } else |
1906 | busy = false; | 1906 | busy = false; |
1907 | } else { | 1907 | } else { |
1908 | int score; | ||
1909 | |||
1910 | /* We always increment the hangcheck score | 1908 | /* We always increment the hangcheck score |
1911 | * if the ring is busy and still processing | 1909 | * if the ring is busy and still processing |
1912 | * the same request, so that no single request | 1910 | * the same request, so that no single request |
@@ -1927,20 +1925,18 @@ static void i915_hangcheck_elapsed(unsigned long data) | |||
1927 | 1925 | ||
1928 | switch (ring->hangcheck.action) { | 1926 | switch (ring->hangcheck.action) { |
1929 | case HANGCHECK_WAIT: | 1927 | case HANGCHECK_WAIT: |
1930 | score = 0; | ||
1931 | break; | 1928 | break; |
1932 | case HANGCHECK_ACTIVE: | 1929 | case HANGCHECK_ACTIVE: |
1933 | score = BUSY; | 1930 | ring->hangcheck.score += BUSY; |
1934 | break; | 1931 | break; |
1935 | case HANGCHECK_KICK: | 1932 | case HANGCHECK_KICK: |
1936 | score = KICK; | 1933 | ring->hangcheck.score += KICK; |
1937 | break; | 1934 | break; |
1938 | case HANGCHECK_HUNG: | 1935 | case HANGCHECK_HUNG: |
1939 | score = HUNG; | 1936 | ring->hangcheck.score += HUNG; |
1940 | stuck[i] = true; | 1937 | stuck[i] = true; |
1941 | break; | 1938 | break; |
1942 | } | 1939 | } |
1943 | ring->hangcheck.score += score; | ||
1944 | } | 1940 | } |
1945 | } else { | 1941 | } else { |
1946 | /* Gradually reduce the count so that we catch DoS | 1942 | /* Gradually reduce the count so that we catch DoS |