Skip to content

Commit

Permalink
checkpatch: Fix inconsistencies skipping datapath files.
Browse files Browse the repository at this point in the history
The code in checkpatch inconsistently stripped "a/" or "b/" from the
beginning of a file name, and the check for "datapath" only worked when
the prefix was not stripped.  This fixes the problem.

Acked-by: Aaron Conole <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
blp committed May 8, 2017
1 parent 88fc528 commit 2797ff0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/checkpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def ovs_checkpatch_parse(text):
match = hunks.match(line)
if match:
parse = parse + 1
current_file = match.group(2)
current_file = match.group(2)[2:]
print_file_name = current_file
continue
elif parse == 0:
Expand Down Expand Up @@ -318,7 +318,7 @@ def ovs_checkpatch_parse(text):

# Skip files which have /datapath in them, since they are
# linux or windows coding standards
if '/datapath' in current_file:
if current_file.startswith('datapath'):
continue
run_checks(current_file, cmp_line, lineno)
if __errors or __warnings:
Expand Down

0 comments on commit 2797ff0

Please sign in to comment.