History

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.

Jani Nikula committed 13 years ago

Commit ea04cb31 parent f2f4d821 file · +3 −7Browse files

Unified · Split

drivers/gpu/drm/i915/i915_irq.c+3−7
@@ -1905,8 +1905,6 @@ static void i915_hangcheck_elapsed(unsigned long data) · 1904 unmodified lines
19051905 } else
19061906 busy = false;
19071907 } else {
1908− int score;
1909−
19101908 /* We always increment the hangcheck score
19111909 * if the ring is busy and still processing
19121910 * the same request, so that no single request
@@ -1927,20 +1925,18 @@ static void i915_hangcheck_elapsed(unsigned long data) · 14 unmodified lines
19271925
19281926 switch (ring->hangcheck.action) {
19291927 case HANGCHECK_WAIT:
1930− score = 0;
19311928 break;
19321929 case HANGCHECK_ACTIVE:
1933− score = BUSY;
1930+ ring->hangcheck.score += BUSY;
19341931 break;
19351932 case HANGCHECK_KICK:
1936− score = KICK;
1933+ ring->hangcheck.score += KICK;
19371934 break;
19381935 case HANGCHECK_HUNG:
1939− score = HUNG;
1936+ ring->hangcheck.score += HUNG;
19401937 stuck[i] = true;
19411938 break;
19421939 }
1943− ring->hangcheck.score += score;
19441940 }
19451941 } else {
19461942 /* Gradually reduce the count so that we catch DoS

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t