Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1545147 > unrolled thread

[PATCH] powerpc/perf/24x7: use rb_entry

Started byGeliang Tang <geliangtang@gmail.com>
First post2016-12-20 15:10 +0100
Last post2016-12-20 15:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] powerpc/perf/24x7: use rb_entry Geliang Tang <geliangtang@gmail.com> - 2016-12-20 15:10 +0100

#1545147 — [PATCH] powerpc/perf/24x7: use rb_entry

FromGeliang Tang <geliangtang@gmail.com>
Date2016-12-20 15:10 +0100
Subject[PATCH] powerpc/perf/24x7: use rb_entry
Message-ID<sQth8-6Ck-27@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web