From: Alexander Pantyukhin <apantykhin@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, paul.gortmaker@windriver.com,
nborisov@suse.com, alexpantyukhin <apantykhin@gmail.com>
Subject: [PATCH] scripts/bloat-o-meter: use the reverse flag for sort
Date: Fri, 6 Jan 2023 14:13:19 +0500 [thread overview]
Message-ID: <20230106091319.3824-1-apantykhin@gmail.com> (raw)
From: alexpantyukhin <apantykhin@gmail.com>
The sort function has the inbuilt reversal option.
We can use it for save some time.
Signed-off-by: Alexander Pantyukhin <apantykhin@gmail.com>
---
scripts/bloat-o-meter | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index f9553f60a14a..36303afa9dfc 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -80,8 +80,7 @@ def calc(oldfile, newfile, format):
if d<0: shrink, down = shrink+1, down-d
delta.append((d, name))
- delta.sort()
- delta.reverse()
+ delta.sort(reverse=True)
return grow, shrink, add, remove, up, down, delta, old, new, otot, ntot
def print_result(symboltype, symbolformat):
--
2.25.1
reply other threads:[~2023-01-06 9:13 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=20230106091319.3824-1-apantykhin@gmail.com \
--to=apantykhin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=paul.gortmaker@windriver.com \
/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®