Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2235281imm; Thu, 7 Jun 2018 07:29:33 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKDNuA7cE+hwuIF0di7NGqA1dBdXlCLgnIjtjxZVotVEAVmqkYgqHTDvy3dATmsGfvOENQs X-Received: by 2002:a63:12:: with SMTP id 18-v6mr1834257pga.121.1528381773927; Thu, 07 Jun 2018 07:29:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528381773; cv=none; d=google.com; s=arc-20160816; b=ZbZqSLaxgyC8Ao23LSAdOmu/VCzfLTogsBEx3dBZPH/j6wx5bqndvl5td/TMhEk8H7 cl8PYOWjVpUEnCRhzIV7maDXelEKLvHZVdfMpnEz453jkcW6YlXao8ZdpAw4LM7L78/U w10hNKawWaSPxXLLtkRDTSDBCdLoOV9vWutbh5/s/JSXPtJIVbQyVtAHxCk2S0N0ip2e YhiJMBMOz9dgU8PSknt//XGS+s5L3Xxs5gNUIPalW6KyNgtj6UqrwWAZLfBAqm7k7Tft aDnh3BooTd8sviKkJqLuDV8frHKxlGiGnqNeJef7PatuNQl+ZCCPcEyN2abPiP4KGgjQ ftxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=nJ0tozAVHkWJbi/0QCxwJVzsyg29lCe9HZMxvrUkHjA=; b=u6+ukS8ygrKpr4eMcLMqXfIKT0H9I8YD8lGt25oA0Dt2/O1vnHI2ftAGQYksKqC8nC xFJofmHgLlozmW4IwbxLT70oqaoAkRtUbtIaHndR5oReibE+GUO1jV2S/8dHIWlRfKg5 24F7FdopOw5dNy9bOGkQHO7S1Uog54YCGUJ/Gh3r26zvEMI9xQ2CMn+mCpWsQjZiChlO ItWw8AXRgX96/O5rnMDt9gZXCBniBmpXhCVAY2ZD1h0Sne+6KbKmhVkQi1YAENujs/to DP8wL1AL2sPkPaZoMcNiqAMDAB03b7y+ys3jS6uRhg/rVXkTRHiOfxwuGJMI73Cr4cLp zgdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31-v6si16746539pli.45.2018.06.07.07.29.19; Thu, 07 Jun 2018 07:29:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933398AbeFGO1Z (ORCPT + 99 others); Thu, 7 Jun 2018 10:27:25 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40186 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933406AbeFGO0p (ORCPT ); Thu, 7 Jun 2018 10:26:45 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbT-0005Zx-Kz; Thu, 07 Jun 2018 15:09:28 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvbB-0003Bc-Jp; Thu, 07 Jun 2018 15:09:09 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Tony Luck" , "Corentin Labbe" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 324/410] ia64: convert unwcheck.py to python3 In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Corentin Labbe commit bd5edbe677948d0883f59d9625c444818d5284b1 upstream. Since my system use python3 as default, arch/ia64/scripts/unwcheck.py no longer run. This patch convert it to the python3 syntax. I have ran it with python2/python3 while printing values of start/end/rlen_sum which could be impacted by this change and I see no difference. Fixes: 94a47083522e ("scripts: change scripts to use system python instead of env") Signed-off-by: Corentin Labbe Signed-off-by: Tony Luck Signed-off-by: Ben Hutchings --- arch/ia64/scripts/unwcheck.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/arch/ia64/scripts/unwcheck.py +++ b/arch/ia64/scripts/unwcheck.py @@ -15,7 +15,7 @@ import re import sys if len(sys.argv) != 2: - print "Usage: %s FILE" % sys.argv[0] + print("Usage: %s FILE" % sys.argv[0]) sys.exit(2) readelf = os.getenv("READELF", "readelf") @@ -28,7 +28,7 @@ def check_func (func, slots, rlen_sum): global num_errors num_errors += 1 if not func: func = "[%#x-%#x]" % (start, end) - print "ERROR: %s: %lu slots, total region length = %lu" % (func, slots, rlen_sum) + print("ERROR: %s: %lu slots, total region length = %lu" % (func, slots, rlen_sum)) return num_funcs = 0 @@ -42,23 +42,23 @@ for line in os.popen("%s -u %s" % (reade check_func(func, slots, rlen_sum) func = m.group(1) - start = long(m.group(2), 16) - end = long(m.group(3), 16) + start = int(m.group(2), 16) + end = int(m.group(3), 16) slots = 3 * (end - start) / 16 - rlen_sum = 0L + rlen_sum = 0 num_funcs += 1 else: m = rlen_pattern.match(line) if m: - rlen_sum += long(m.group(1)) + rlen_sum += int(m.group(1)) check_func(func, slots, rlen_sum) if num_errors == 0: - print "No errors detected in %u functions." % num_funcs + print("No errors detected in %u functions." % num_funcs) else: if num_errors > 1: err="errors" else: err="error" - print "%u %s detected in %u functions." % (num_errors, err, num_funcs) + print("%u %s detected in %u functions." % (num_errors, err, num_funcs)) sys.exit(1)