Commit b730bab
committed
PM: sleep: stats: Use an array of step failure counters
Instead of using a set of individual struct suspend_stats fields
representing suspend step failure counters, use an array of counters
indexed by enum suspend_stat_step for this purpose, which allows
dpm_save_failed_step() to increment the appropriate counter
automatically, so that its callers don't need to do that directly.
It also allows suspend_stats_show() to carry out a loop over the
counters array to print their values.
Because the counters cannot become negative, use unsigned int for
representing them.
The only user-observable impact of this change is a different
ordering of entries in the suspend_stats debugfs file which is not
expected to matter.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>1 parent bc88528 commit b730bab
4 files changed
Lines changed: 40 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
689 | | - | |
690 | 689 | | |
691 | 690 | | |
692 | 691 | | |
| |||
817 | 816 | | |
818 | 817 | | |
819 | 818 | | |
820 | | - | |
821 | 819 | | |
822 | 820 | | |
823 | 821 | | |
| |||
974 | 972 | | |
975 | 973 | | |
976 | 974 | | |
977 | | - | |
978 | 975 | | |
979 | 976 | | |
980 | 977 | | |
| |||
1323 | 1320 | | |
1324 | 1321 | | |
1325 | 1322 | | |
1326 | | - | |
1327 | | - | |
| 1323 | + | |
1328 | 1324 | | |
1329 | | - | |
| 1325 | + | |
1330 | 1326 | | |
1331 | 1327 | | |
1332 | 1328 | | |
| |||
1509 | 1505 | | |
1510 | 1506 | | |
1511 | 1507 | | |
| 1508 | + | |
1512 | 1509 | | |
1513 | | - | |
1514 | 1510 | | |
1515 | 1511 | | |
1516 | 1512 | | |
| |||
1789 | 1785 | | |
1790 | 1786 | | |
1791 | 1787 | | |
1792 | | - | |
1793 | | - | |
| 1788 | + | |
| 1789 | + | |
1794 | 1790 | | |
1795 | | - | |
| 1791 | + | |
1796 | 1792 | | |
1797 | 1793 | | |
1798 | 1794 | | |
| |||
1943 | 1939 | | |
1944 | 1940 | | |
1945 | 1941 | | |
1946 | | - | |
1947 | | - | |
| 1942 | + | |
1948 | 1943 | | |
1949 | | - | |
| 1944 | + | |
1950 | 1945 | | |
| 1946 | + | |
1951 | 1947 | | |
1952 | 1948 | | |
1953 | 1949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 61 | | |
67 | 62 | | |
68 | 63 | | |
| |||
95 | 90 | | |
96 | 91 | | |
97 | 92 | | |
| 93 | + | |
98 | 94 | | |
99 | 95 | | |
100 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | 344 | | |
353 | 345 | | |
354 | 346 | | |
355 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
356 | 366 | | |
357 | 367 | | |
358 | 368 | | |
| |||
439 | 449 | | |
440 | 450 | | |
441 | 451 | | |
| 452 | + | |
442 | 453 | | |
443 | 454 | | |
444 | 455 | | |
445 | 456 | | |
446 | 457 | | |
447 | 458 | | |
448 | 459 | | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
465 | 468 | | |
466 | 469 | | |
467 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
371 | 370 | | |
372 | 371 | | |
373 | 372 | | |
| |||
0 commit comments