summaryrefslogtreecommitdiff
path: root/tools/patman/checkpatch.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/patman/checkpatch.py')
-rw-r--r--tools/patman/checkpatch.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py
index 263bac3fc9..98d962cd50 100644
--- a/tools/patman/checkpatch.py
+++ b/tools/patman/checkpatch.py
@@ -95,6 +95,7 @@ def CheckPatch(fname, verbose=False, show_types=False):
re_check = re.compile('CHECK:%s (.*)' % type_name)
re_file = re.compile('#\d+: FILE: ([^:]*):(\d+):')
re_note = re.compile('NOTE: (.*)')
+ re_new_file = re.compile('new file mode .*')
indent = ' ' * 6
for line in result.stdout.splitlines():
if verbose:
@@ -111,8 +112,10 @@ def CheckPatch(fname, verbose=False, show_types=False):
# Skip lines which quote code
if line.startswith(indent):
continue
- # Skip code quotes and #<n>
- if line.startswith('+') or line.startswith('#'):
+ # Skip code quotes
+ if line.startswith('+'):
+ continue
+ if re_new_file.match(line):
continue
match = re_stats_full.match(line)
if not match: