[PATCH] scripts/bloat-o-meter: use the reverse flag for sort
From: Alexander Pantyukhin
Date: Fri Jan 06 2023 - 04:13:53 EST
From: alexpantyukhin <apantykhin@xxxxxxxxx>
The sort function has the inbuilt reversal option.
We can use it for save some time.
Signed-off-by: Alexander Pantyukhin <apantykhin@xxxxxxxxx>
---
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