* [PATCH] powerpc/perf/24x7: use rb_entry
[not found] <ddabc96c798df194791134d8e070d728e2a7b59f.1482203698.git.geliangtang@gmail.com>
@ 2016-12-20 14:02 ` Geliang Tang
2019-07-08 1:19 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2016-12-20 14:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Sukadev Bhattiprolu, Alexey Kardashevskiy, David Gibson
Cc: Geliang Tang, linuxppc-dev, linux-kernel
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
arch/powerpc/perf/hv-24x7.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 7b2ca16..51bd3b4 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -547,7 +547,7 @@ static int event_uniq_add(struct rb_root *root, const char *name, int nl,
struct event_uniq *it;
int result;
- it = container_of(*new, struct event_uniq, node);
+ it = rb_entry(*new, struct event_uniq, node);
result = ev_uniq_ord(name, nl, domain, it->name, it->nl,
it->domain);
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/perf/24x7: use rb_entry
2016-12-20 14:02 ` [PATCH] powerpc/perf/24x7: use rb_entry Geliang Tang
@ 2019-07-08 1:19 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2019-07-08 1:19 UTC (permalink / raw)
To: Geliang Tang, Benjamin Herrenschmidt, Paul Mackerras,
Sukadev Bhattiprolu, Alexey Kardashevskiy, David Gibson
Cc: Geliang Tang, linuxppc-dev, linux-kernel
On Tue, 2016-12-20 at 14:02:17 UTC, Geliang Tang wrote:
> To make the code clearer, use rb_entry() instead of container_of() to
> deal with rbtree.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/c197922f0a8072d286dff8001f8ad0d4b95ec1dd
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-08 2:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ddabc96c798df194791134d8e070d728e2a7b59f.1482203698.git.geliangtang@gmail.com>
2016-12-20 14:02 ` [PATCH] powerpc/perf/24x7: use rb_entry Geliang Tang
2019-07-08 1:19 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).