mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amjad Ouled-Ameur <aouledameur@baylibre.com>
To: jan.kiszka@siemens.com
Cc: linux-kernel@vger.kernel.org, narmstrong@baylibre.com,
	kbingham@kernel.org, Amjad Ouled-Ameur <aouledameur@baylibre.com>
Subject: [PATCH 1/3] scripts/gdb: timerlist: use range instead of xrange
Date: Wed, 27 Jul 2022 16:14:41 +0200	[thread overview]
Message-ID: <20220727141443.133094-2-aouledameur@baylibre.com> (raw)
In-Reply-To: <20220727141443.133094-1-aouledameur@baylibre.com>

xrange has been renamed to range in Python 3. Therefore,
timerlist currently fails with NameError exception:

Python Exception <class 'NameError'> name 'xrange' is not defined.

Use range instead of xrange.

Signed-off-by: Amjad Ouled-Ameur <aouledameur@baylibre.com>
---
 scripts/gdb/linux/timerlist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index 071d0dd5a634..fac951236dc4 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -73,7 +73,7 @@ def print_cpu(hrtimer_bases, cpu, max_clock_bases):
     ts = cpus.per_cpu(tick_sched_ptr, cpu)
 
     text = "cpu: {}\n".format(cpu)
-    for i in xrange(max_clock_bases):
+    for i in range(max_clock_bases):
         text += " clock {}:\n".format(i)
         text += print_base(cpu_base['clock_base'][i])
 
-- 
2.37.1


  reply	other threads:[~2022-07-27 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-27 14:14 [PATCH 0/3] scripts/gdb: timerlist: fix rb_node access and python errors Amjad Ouled-Ameur
2022-07-27 14:14 ` Amjad Ouled-Ameur [this message]
2022-07-27 14:14 ` [PATCH 2/3] scripts/gdb: timerlist: fix rb_node access Amjad Ouled-Ameur
2022-07-27 14:14 ` [PATCH 3/3] scripts/gdb: timerlist: convert int chunks to str Amjad Ouled-Ameur
2023-03-24 13:03 ` [PATCH 0/3] scripts/gdb: timerlist: fix rb_node access and python errors Florian Fainelli
2023-03-26 14:26   ` Amjad Ouled-Ameur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220727141443.133094-2-aouledameur@baylibre.com \
    --to=aouledameur@baylibre.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kbingham@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®