Commit 0371ba6f authored by Alexander Pantyukhin's avatar Alexander Pantyukhin Committed by Andrew Morton

scripts/bloat-o-meter: use the reverse flag for sort

The sort function has the inbuilt reversal option.  We can use it to save
some time.

Link: https://lkml.kernel.org/r/20230106091319.3824-1-apantykhin@gmail.comSigned-off-by: default avatarAlexander Pantyukhin <apantykhin@gmail.com>
Cc: Nikolay Borisov <nborisov@suse.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e36903b0
...@@ -80,8 +80,7 @@ def calc(oldfile, newfile, format): ...@@ -80,8 +80,7 @@ def calc(oldfile, newfile, format):
if d<0: shrink, down = shrink+1, down-d if d<0: shrink, down = shrink+1, down-d
delta.append((d, name)) delta.append((d, name))
delta.sort() delta.sort(reverse=True)
delta.reverse()
return grow, shrink, add, remove, up, down, delta, old, new, otot, ntot return grow, shrink, add, remove, up, down, delta, old, new, otot, ntot
def print_result(symboltype, symbolformat): def print_result(symboltype, symbolformat):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment