diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-20 06:27:18 -0400 |
commit | 4958134df54c2c84e9c22ea042761d439164d26e (patch) | |
tree | 503177afab11f7d25b12a84ce25b481d305c51ba /arch/ia64/scripts/unwcheck.py | |
parent | c4f528795d1add8b63652673f7262729f679c6c1 (diff) | |
parent | c698ca5278934c0ae32297a8725ced2e27585d7f (diff) |
Merge 4.16-rc6 into tty-next
We want the serial/tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/ia64/scripts/unwcheck.py')
-rw-r--r-- | arch/ia64/scripts/unwcheck.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/ia64/scripts/unwcheck.py b/arch/ia64/scripts/unwcheck.py index 89f3a1480a63..c55276e31b6b 100644 --- a/arch/ia64/scripts/unwcheck.py +++ b/arch/ia64/scripts/unwcheck.py | |||
@@ -16,7 +16,7 @@ import re | |||
16 | import sys | 16 | import sys |
17 | 17 | ||
18 | if len(sys.argv) != 2: | 18 | if len(sys.argv) != 2: |
19 | print "Usage: %s FILE" % sys.argv[0] | 19 | print("Usage: %s FILE" % sys.argv[0]) |
20 | sys.exit(2) | 20 | sys.exit(2) |
21 | 21 | ||
22 | readelf = os.getenv("READELF", "readelf") | 22 | readelf = os.getenv("READELF", "readelf") |
@@ -29,7 +29,7 @@ def check_func (func, slots, rlen_sum): | |||
29 | global num_errors | 29 | global num_errors |
30 | num_errors += 1 | 30 | num_errors += 1 |
31 | if not func: func = "[%#x-%#x]" % (start, end) | 31 | if not func: func = "[%#x-%#x]" % (start, end) |
32 | print "ERROR: %s: %lu slots, total region length = %lu" % (func, slots, rlen_sum) | 32 | print("ERROR: %s: %lu slots, total region length = %lu" % (func, slots, rlen_sum)) |
33 | return | 33 | return |
34 | 34 | ||
35 | num_funcs = 0 | 35 | num_funcs = 0 |
@@ -43,23 +43,23 @@ for line in os.popen("%s -u %s" % (readelf, sys.argv[1])): | |||
43 | check_func(func, slots, rlen_sum) | 43 | check_func(func, slots, rlen_sum) |
44 | 44 | ||
45 | func = m.group(1) | 45 | func = m.group(1) |
46 | start = long(m.group(2), 16) | 46 | start = int(m.group(2), 16) |
47 | end = long(m.group(3), 16) | 47 | end = int(m.group(3), 16) |
48 | slots = 3 * (end - start) / 16 | 48 | slots = 3 * (end - start) / 16 |
49 | rlen_sum = 0L | 49 | rlen_sum = 0 |
50 | num_funcs += 1 | 50 | num_funcs += 1 |
51 | else: | 51 | else: |
52 | m = rlen_pattern.match(line) | 52 | m = rlen_pattern.match(line) |
53 | if m: | 53 | if m: |
54 | rlen_sum += long(m.group(1)) | 54 | rlen_sum += int(m.group(1)) |
55 | check_func(func, slots, rlen_sum) | 55 | check_func(func, slots, rlen_sum) |
56 | 56 | ||
57 | if num_errors == 0: | 57 | if num_errors == 0: |
58 | print "No errors detected in %u functions." % num_funcs | 58 | print("No errors detected in %u functions." % num_funcs) |
59 | else: | 59 | else: |
60 | if num_errors > 1: | 60 | if num_errors > 1: |
61 | err="errors" | 61 | err="errors" |
62 | else: | 62 | else: |
63 | err="error" | 63 | err="error" |
64 | print "%u %s detected in %u functions." % (num_errors, err, num_funcs) | 64 | print("%u %s detected in %u functions." % (num_errors, err, num_funcs)) |
65 | sys.exit(1) | 65 | sys.exit(1) |