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.
Unified · Split
| @@ -1905,8 +1905,6 @@ static void i915_hangcheck_elapsed(unsigned long data) · 1904 unmodified lines | ||
| 1905 | 1905 | } else |
| 1906 | 1906 | busy = false; |
| 1907 | 1907 | } else { |
| 1908 | − int score; | |
| 1909 | − | |
| 1910 | 1908 | /* We always increment the hangcheck score |
| 1911 | 1909 | * if the ring is busy and still processing |
| 1912 | 1910 | * the same request, so that no single request |
| @@ -1927,20 +1925,18 @@ static void i915_hangcheck_elapsed(unsigned long data) · 14 unmodified lines | ||
| 1927 | 1925 | |
| 1928 | 1926 | switch (ring->hangcheck.action) { |
| 1929 | 1927 | case HANGCHECK_WAIT: |
| 1930 | − score = 0; | |
| 1931 | 1928 | break; |
| 1932 | 1929 | case HANGCHECK_ACTIVE: |
| 1933 | − score = BUSY; | |
| 1930 | + ring->hangcheck.score += BUSY; | |
| 1934 | 1931 | break; |
| 1935 | 1932 | case HANGCHECK_KICK: |
| 1936 | − score = KICK; | |
| 1933 | + ring->hangcheck.score += KICK; | |
| 1937 | 1934 | break; |
| 1938 | 1935 | case HANGCHECK_HUNG: |
| 1939 | − score = HUNG; | |
| 1936 | + ring->hangcheck.score += HUNG; | |
| 1940 | 1937 | stuck[i] = true; |
| 1941 | 1938 | break; |
| 1942 | 1939 | } |
| 1943 | − ring->hangcheck.score += score; | |
| 1944 | 1940 | } |
| 1945 | 1941 | } else { |
| 1946 | 1942 | /* Gradually reduce the count so that we catch DoS |