This commit is contained in:
Costa Shulyupin 2018-07-19 08:34:54 +03:00
parent 992d59721a
commit d33d8207f0
1 changed files with 10 additions and 3 deletions

View File

@ -19,7 +19,8 @@ import subprocess
import re
black_list = ['aligned', '__attribute__', 'unlikely', 'typeof', 'u32',
'PVOP_CALLEE0', 'PVOP_VCALLEE0', 'PVOP_VCALLEE1', 'trace_hardirqs_off']
'PVOP_CALLEE0', 'PVOP_VCALLEE0', 'PVOP_VCALLEE1', 'if',
'trace_hardirqs_off']
level_limit = 7
limit = 10000
@ -79,8 +80,14 @@ def func_referers_git_grep(name):
# Filter out names in comment afer function,
# when comment start from ' *'
# To see the problem try "git grep -p and"
if re.match(r'.*: \* ', line):
r = None
for p in {
r'.*: \* .*%s',
r'.*/\*.*%s',
r'.*//.*%s',
r'.*".*\b%s\b.*"'}:
if re.match(p % (name), line):
r = None
break
if r and r != name and r not in black_list:
res.append(r)
r = None