Skip to content

Commit c91d339

Browse files
sergey-senozhatskysashalevin
authored andcommitted
scripts/bloat-o-meter: fix python3 syntax error
[ Upstream commit 72214a2 ] In Python3+ print is a function so the old syntax is not correct anymore: $ ./scripts/bloat-o-meter vmlinux.o vmlinux.o.old File "./scripts/bloat-o-meter", line 61 print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \ ^ SyntaxError: invalid syntax Fix by calling print as a function. Tested on python 2.7.11, 3.5.1 Signed-off-by: Sergey Senozhatsky <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 68cc977 commit c91d339

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/bloat-o-meter

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ for name in common:
5858
delta.sort()
5959
delta.reverse()
6060

61-
print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
62-
(add, remove, grow, shrink, up, -down, up-down)
63-
print "%-40s %7s %7s %+7s" % ("function", "old", "new", "delta")
61+
print("add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
62+
(add, remove, grow, shrink, up, -down, up-down))
63+
print("%-40s %7s %7s %+7s" % ("function", "old", "new", "delta"))
6464
for d, n in delta:
65-
if d: print "%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d)
65+
if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d))

0 commit comments

Comments
 (0)