mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Amjad Ouled-Ameur <aouledameur@baylibre.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Kieran Bingham <kbingham@kernel.org>
Subject: [PATCH RESEND 2/3] scripts/gdb: timerlist: fix rb_node access
Date: Thu,  6 Apr 2023 15:12:16 -0700	[thread overview]
Message-ID: <20230406221217.1585486-3-f.fainelli@gmail.com> (raw)
In-Reply-To: <20230406221217.1585486-1-f.fainelli@gmail.com>

From: Amjad Ouled-Ameur <aouledameur@baylibre.com>

"struct 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.

Tested-by: Florian Fainelli <f.fainelli@gmail.com>
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.34.1


  parent reply	other threads:[~2023-04-06 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 22:12 [PATCH RESEND 0/3] scripts/gdb: timerlist fixes Florian Fainelli
2023-04-06 22:12 ` [PATCH RESEND 1/3] scripts/gdb: timerlist: use range instead of xrange Florian Fainelli
2023-04-06 22:12 ` Florian Fainelli [this message]
2023-04-06 22:12 ` [PATCH RESEND 3/3] scripts/gdb: timerlist: convert int chunks to str Florian Fainelli
2023-04-06 23:18 ` [PATCH RESEND 0/3] scripts/gdb: timerlist fixes Andrew Morton
2023-04-08  3:51   ` Florian Fainelli

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=20230406221217.1585486-3-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=aouledameur@baylibre.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kbingham@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®