diff options
author | Valentin Rothberg <valentinrothberg@gmail.com> | 2017-01-18 07:08:19 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-19 05:28:31 -0500 |
commit | 8e8e333179d6ea50fd0491b138e71dc9d98378ba (patch) | |
tree | 5d09aada9c6fc70f909799ce39a0c3377545a76d /scripts/checkkconfigsymbols.py | |
parent | 39461ffdfc974147ad0f3cc0da397a999adc25b1 (diff) |
checkkconfigsymbols.py: don't sort similar symbols
Don't sort the list of string-similar Kconfig symbols alphabetically to
preserve the correct order of string similarity.
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/checkkconfigsymbols.py')
-rwxr-xr-x | scripts/checkkconfigsymbols.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py index 3820f00b066a..f1d6b14081ac 100755 --- a/scripts/checkkconfigsymbols.py +++ b/scripts/checkkconfigsymbols.py | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | """Find Kconfig symbols that are referenced but not defined.""" | 3 | """Find Kconfig symbols that are referenced but not defined.""" |
4 | 4 | ||
5 | # (c) 2014-2016 Valentin Rothberg <valentinrothberg@gmail.com> | 5 | # (c) 2014-2017 Valentin Rothberg <valentinrothberg@gmail.com> |
6 | # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> | 6 | # (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> |
7 | # | 7 | # |
8 | # Licensed under the terms of the GNU GPL License version 2 | 8 | # Licensed under the terms of the GNU GPL License version 2 |
@@ -269,7 +269,7 @@ def find_sims(symbol, ignore, defined=[]): | |||
269 | """Return a list of max. ten Kconfig symbols that are string-similar to | 269 | """Return a list of max. ten Kconfig symbols that are string-similar to |
270 | @symbol.""" | 270 | @symbol.""" |
271 | if defined: | 271 | if defined: |
272 | return sorted(difflib.get_close_matches(symbol, set(defined), 10)) | 272 | return difflib.get_close_matches(symbol, set(defined), 10) |
273 | 273 | ||
274 | pool = Pool(cpu_count(), init_worker) | 274 | pool = Pool(cpu_count(), init_worker) |
275 | kfiles = [] | 275 | kfiles = [] |
@@ -284,7 +284,7 @@ def find_sims(symbol, ignore, defined=[]): | |||
284 | for res in pool.map(parse_kconfig_files, arglist): | 284 | for res in pool.map(parse_kconfig_files, arglist): |
285 | defined.extend(res[0]) | 285 | defined.extend(res[0]) |
286 | 286 | ||
287 | return sorted(difflib.get_close_matches(symbol, set(defined), 10)) | 287 | return difflib.get_close_matches(symbol, set(defined), 10) |
288 | 288 | ||
289 | 289 | ||
290 | def get_files(): | 290 | def get_files(): |