summaryrefslogtreecommitdiff
path: root/tools/qconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qconfig.py')
-rwxr-xr-xtools/qconfig.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/tools/qconfig.py b/tools/qconfig.py
index 8c2fc9efc5f..058d72cf4bc 100755
--- a/tools/qconfig.py
+++ b/tools/qconfig.py
@@ -77,7 +77,7 @@ IGNORE_SYMS = ['DEBUG_SECTION_MISMATCH', 'FTRACE_MCOUNT_RECORD', 'GCOV_KERNEL',
'IS_ENABLED_', 'IS_ENABLED_1', 'IS_ENABLED_2', 'IS_ENABLED_3',
'SPL_', 'TPL_', 'SPL_FOO', 'TPL_FOO', 'TOOLS_FOO',
'ACME', 'SPL_ACME', 'TPL_ACME', 'TRACE_BRANCH_PROFILING',
- 'VAL', '_UNDEFINED', 'SPL_BUILD', ]
+ 'VAL', '_UNDEFINED', 'SPL_BUILD', 'XPL_BUILD', ]
SPL_PREFIXES = ['SPL_', 'TPL_', 'VPL_', 'TOOLS_']
@@ -1175,7 +1175,7 @@ def prefix_config(cfg):
return oper + cfg
-RE_MK_CONFIGS = re.compile(r'CONFIG_(\$\(SPL_(?:TPL_)?\))?([A-Za-z0-9_]*)')
+RE_MK_CONFIGS = re.compile(r'CONFIG_(\$\(XPL_\)|\$\(PHASE_\))?([A-Za-z0-9_]*)')
RE_IFDEF = re.compile(r'(ifdef|ifndef)')
RE_C_CONFIGS = re.compile(r'CONFIG_([A-Za-z0-9_]*)')
RE_CONFIG_IS = re.compile(r'CONFIG_IS_ENABLED\(([A-Za-z0-9_]*)\)')
@@ -1186,7 +1186,7 @@ class ConfigUse:
"""Set up a new ConfigUse
Args:
- cfg (str): CONFIG option, without any CONFIG_ or SPL_ prefix
+ cfg (str): CONFIG option, without any CONFIG_ or xPL_ prefix
is_spl (bool): True if this option relates to SPL
fname (str): Makefile filename where the CONFIG option was found
rest (str): Line of the Makefile
@@ -1220,10 +1220,10 @@ def scan_makefiles(fnames):
>>> RE_MK_CONFIGS.search('CONFIG_FRED').groups()
(None, 'FRED')
- >>> RE_MK_CONFIGS.search('CONFIG_$(SPL_)MARY').groups()
- ('$(SPL_)', 'MARY')
- >>> RE_MK_CONFIGS.search('CONFIG_$(SPL_TPL_)MARY').groups()
- ('$(SPL_TPL_)', 'MARY')
+ >>> RE_MK_CONFIGS.search('CONFIG_$(XPL_)MARY').groups()
+ ('$(XPL_)', 'MARY')
+ >>> RE_MK_CONFIGS.search('CONFIG_$(PHASE_)MARY').groups()
+ ('$(PHASE_)', 'MARY')
"""
all_uses = collections.defaultdict(list)
fname_uses = {}
@@ -1319,10 +1319,10 @@ def do_scan_source(path, do_update):
key (ConfigUse): object
value (list of str): matching lines
spl_mode (int): If MODE_SPL, look at source code which implies
- an SPL_ option, but for which there is none;
+ an xPL_ option, but for which there is none;
for MOD_PROPER, look at source code which implies a Proper
- option (i.e. use of CONFIG_IS_ENABLED() or $(SPL_) or
- $(SPL_TPL_) but for which there none;
+ option (i.e. use of CONFIG_IS_ENABLED() or $(XPL_) or
+ $(PHASE_) but for which there none;
if MODE_NORMAL, ignore SPL
Returns:
@@ -1341,7 +1341,7 @@ def do_scan_source(path, do_update):
if spl_mode == MODE_SPL:
check = use.is_spl
- # If it is an SPL symbol, try prepending all SPL_ prefixes to
+ # If it is an SPL symbol, try prepending all xPL_ prefixes to
# find at least one SPL symbol
if use.is_spl:
for prefix in SPL_PREFIXES:
@@ -1354,7 +1354,7 @@ def do_scan_source(path, do_update):
continue
elif spl_mode == MODE_PROPER:
# Try to find the Proper version of this symbol, i.e. without
- # the SPL_ prefix
+ # the xPL_ prefix
proper_name = is_not_proper(name)
if proper_name:
name = proper_name
@@ -1450,7 +1450,7 @@ def do_scan_source(path, do_update):
show_uses(not_found)
spl_not_found |= {is_not_proper(key) or key for key in not_found.keys()}
- print('\nCONFIG options used as Proper in Makefiles but without a non-SPL_ variant:')
+ print('\nCONFIG options used as Proper in Makefiles but without a non-xPL_ variant:')
not_found = check_not_found(all_uses, MODE_PROPER)
show_uses(not_found)
proper_not_found |= {not_found.keys()}
@@ -1468,16 +1468,16 @@ def do_scan_source(path, do_update):
show_uses(not_found)
spl_not_found |= {is_not_proper(key) or key for key in not_found.keys()}
- print('\nCONFIG options used as Proper in source but without a non-SPL_ variant:')
+ print('\nCONFIG options used as Proper in source but without a non-xPL_ variant:')
not_found = check_not_found(all_uses, MODE_PROPER)
show_uses(not_found)
proper_not_found |= {not_found.keys()}
- print('\nCONFIG options used as SPL but without an SPL_ variant:')
+ print('\nCONFIG options used as SPL but without an xPL_ variant:')
for item in sorted(spl_not_found):
print(f' {item}')
- print('\nCONFIG options used as Proper but without a non-SPL_ variant:')
+ print('\nCONFIG options used as Proper but without a non-xPL_ variant:')
for item in sorted(proper_not_found):
print(f' {item}')