aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass2020-05-06 16:29:06 -0600
committerSimon Glass2020-06-11 20:52:10 -0600
commit7175b085e1213c99fbc237483b33cd52ff00f891 (patch)
tree39442023f2a4bf771754905b48628f462220b762 /tools
parent7d5b5e8965b3f0bdf91665cf654b9eaeb9b30e52 (diff)
patman: Don't try to process checkpatch lines twice
Once we have determined what the line refers to there is no point in processing it further. Update the logic to continue to the next line in these cases. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/patman/checkpatch.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
index 16d534b6ae0..2cfa9778c6d 100644
--- a/tools/patman/checkpatch.py
+++ b/tools/patman/checkpatch.py
@@ -91,9 +91,11 @@ def CheckPatch(fname, verbose=False):
print(line)
# A blank line indicates the end of a message
- if not line and item:
- result.problems.append(item)
- item = {}
+ if not line:
+ if item:
+ result.problems.append(item)
+ item = {}
+ continue
match = re_stats_full.match(line)
if not match:
match = re_stats.match(line)
@@ -105,10 +107,13 @@ def CheckPatch(fname, verbose=False):
result.lines = int(match.group(4))
else:
result.lines = int(match.group(3))
+ continue
elif re_ok.match(line):
result.ok = True
+ continue
elif re_bad.match(line):
result.ok = False
+ continue
err_match = re_error.match(line)
warn_match = re_warning.match(line)
file_match = re_file.match(line)