Commit 3e469cd
checkpatch: optimise statement scanner when mid-statement
In the middle of a long definition or similar, there is no possibility of
finding a smaller sub-statement. Optimise this case by skipping statement
aquirey where there are no starts of statement (open brace '{' or
semi-colon ';'). We are likely to scan slightly more than needed still
but this is safest.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 89a8835 commit 3e469cd
1 file changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1373 | 1373 | | |
1374 | 1374 | | |
1375 | 1375 | | |
| 1376 | + | |
1376 | 1377 | | |
1377 | 1378 | | |
1378 | 1379 | | |
| |||
1482 | 1483 | | |
1483 | 1484 | | |
1484 | 1485 | | |
| 1486 | + | |
1485 | 1487 | | |
1486 | 1488 | | |
1487 | 1489 | | |
| |||
1809 | 1811 | | |
1810 | 1812 | | |
1811 | 1813 | | |
1812 | | - | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
1813 | 1817 | | |
1814 | 1818 | | |
1815 | 1819 | | |
1816 | 1820 | | |
1817 | 1821 | | |
1818 | | - | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
1819 | 1831 | | |
1820 | 1832 | | |
1821 | 1833 | | |
| |||
1942 | 1954 | | |
1943 | 1955 | | |
1944 | 1956 | | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
1945 | 1960 | | |
1946 | 1961 | | |
1947 | 1962 | | |
| |||
2620 | 2635 | | |
2621 | 2636 | | |
2622 | 2637 | | |
| 2638 | + | |
| 2639 | + | |
| 2640 | + | |
2623 | 2641 | | |
2624 | 2642 | | |
2625 | 2643 | | |
| |||
0 commit comments