lkml.org 
[lkml]   [2019]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] scripts/gdb: Add hlist utilities
Date
Quoting Leonard Crestez (2019-04-22 01:26:56)
> This allows easily examining kernel hlists in python.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

> +
> +
> +def hlist_for_each_entry(head, gdbtype, member):
> + for node in hlist_for_each(head):
> + if node.type != hlist_node.get_type().pointer():
> + raise TypeError("Type {} found. Expected struct hlist_head *."

Maybe drop the full-stop? It looks weird to see struct list_head *.

> + .format(node.type))
> + yield utils.container_of(node, gdbtype, member)
> +
> +

\
 
 \ /
  Last update: 2019-04-22 22:42    [W:0.064 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site