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 2/3] scripts/gdb: timerlist: fix rb_node access
Date: Wed, 27 Jul 2022 16:14:42 +0200	[thread overview]
Message-ID: <20220727141443.133094-3-aouledameur@baylibre.com> (raw)
In-Reply-To: <20220727141443.133094-1-aouledameur@baylibre.com>

"strcut timerqueue_head" no longer has "next" member since v5.4-rc1:
commit 511885d7061e ("lib/timerqueue: Rely on rbtree semantics for next
timer")

Therefore, access "rb_node" through active->rb_root->rb_root->rb_node.

Moreoever, remove  curr.address.cast() on rb_node as this breaks the code
and is not necessary.

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

diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index fac951236dc4..d16909f8df35 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -43,8 +43,7 @@ def print_timer(rb_node, idx):
 
 
 def print_active_timers(base):
-    curr = base['active']['next']['node']
-    curr = curr.address.cast(rbtree.rb_node_type.get_type().pointer())
+    curr = base['active']['rb_root']['rb_root']['rb_node']
     idx = 0
     while curr:
         yield print_timer(curr, idx)
-- 
2.37.1


  parent reply	other threads:[~2022-07-27 14:15 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 ` [PATCH 1/3] scripts/gdb: timerlist: use range instead of xrange Amjad Ouled-Ameur
2022-07-27 14:14 ` Amjad Ouled-Ameur [this message]
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-3-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®