From: Valentin Rothberg <valentinrothberg@gmail.com>
To: gregkh@linuxfoundation.org
Cc: stefan.hengelein@fau.de, linux-kernel@vger.kernel.org,
pebolle@tiscali.nl,
Valentin Rothberg <valentinrothberg@gmail.com>
Subject: [PATCH] checkkconfigsymbols.py: fix sorted output
Date: Mon, 23 Mar 2015 18:40:49 +0100 [thread overview]
Message-ID: <1427132449-24941-1-git-send-email-valentinrothberg@gmail.com> (raw)
Commit b1a3f243485f ("checkkconfigsymbols.py: make it Git aware")
mistakenly removed to print undefined Kconfig symbols in alphabetical
order. Furthermore, the script does not print anything anymore when the
entire tree is checked (i.e., when no commit is specified).
This patch restores the sorted output and adds the missing print for the
default case. Additionally, the file lists are now sorted as well which
(a) makes it easier to read and (b) makes the output deterministic.
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
---
This patch is written against the char-misc-next branch in Greg's
char-misc git tree; the mentioned commit is not yet in linux-next.
The char-misc tree can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
---
scripts/checkkconfigsymbols.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py
index ce9ca60808b8..74086a583d8d 100755
--- a/scripts/checkkconfigsymbols.py
+++ b/scripts/checkkconfigsymbols.py
@@ -112,14 +112,15 @@ def main():
undefined_b = check_symbols()
# report cases that are present for the commit but not before
- for feature in undefined_b:
+ for feature in sorted(undefined_b):
# feature has not been undefined before
if not feature in undefined_a:
- files = undefined_b.get(feature)
+ files = sorted(undefined_b.get(feature))
print "%s\t%s" % (feature, ", ".join(files))
# check if there are new files that reference the undefined feature
else:
- files = undefined_b.get(feature) - undefined_a.get(feature)
+ files = sorted(undefined_b.get(feature) -
+ undefined_a.get(feature))
if files:
print "%s\t%s" % (feature, ", ".join(files))
@@ -129,8 +130,9 @@ def main():
# default to check the entire tree
else:
undefined = check_symbols()
- for feature in undefined:
- files = undefined.get(feature)
+ for feature in sorted(undefined):
+ files = sorted(undefined.get(feature))
+ print "%s\t%s" % (feature, ", ".join(files))
def execute(cmd):
--
2.1.0
reply other threads:[~2015-03-23 17:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427132449-24941-1-git-send-email-valentinrothberg@gmail.com \
--to=valentinrothberg@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pebolle@tiscali.nl \
--cc=stefan.hengelein@fau.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®