aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-03-05 20:18:53 -0700
committerSimon Glass <sjg@chromium.org>2022-03-18 19:24:24 -0600
commit78f12e53696f937afe5a894912c4c6c576b9010e (patch)
treedb82f221b62546ed735b64a209a4dc5fedbd2982 /tools
parent61012538184540b60b35eeb8e5654bfbcd0dbf32 (diff)
downloadu-boot-78f12e53696f937afe5a894912c4c6c576b9010e.zip
u-boot-78f12e53696f937afe5a894912c4c6c576b9010e.tar.gz
u-boot-78f12e53696f937afe5a894912c4c6c576b9010e.tar.bz2
moveconfig: Remove remove_defconfig()
This is not necessary if simpler code is used. Use the split function and drop the unnecessary [] Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Suggested-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/moveconfig.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index d4a96ef..ecc6e16 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -94,17 +94,6 @@ SIZES = {
RE_REMOVE_DEFCONFIG = re.compile(r'(.*)_defconfig')
### helper functions ###
-def remove_defconfig(defc):
- """Drop the _defconfig suffix on a string
-
- Args:
- defc (str): String to convert
-
- Returns:
- str: string with the '_defconfig' suffix removed
- """
- return RE_REMOVE_DEFCONFIG.match(defc)[1]
-
def check_top_directory():
"""Exit if we are not at the top of source directory."""
for fname in 'README', 'Licenses':
@@ -1668,7 +1657,7 @@ def do_find_config(config_list):
print(f"Error: Not in Kconfig: %s" % ' '.join(adhoc))
else:
print(f'{len(out)} matches')
- print(' '.join([remove_defconfig(item) for item in out]))
+ print(' '.join(item.split('_defconfig')[0] for item in out))
def prefix_config(cfg):