]> git.baikalelectronics.ru Git - kernel.git/commit
perf symbols: Remove incorrect open-coded container_of()
authorRabin Vincent <rabin@rab.in>
Tue, 23 Nov 2010 16:38:18 +0000 (22:08 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 23 Nov 2010 18:30:32 +0000 (16:30 -0200)
commit863421bd58b79f5cef9076465d8bfd71c78aba8f
tree99d0c8789c22f32e8aad42824b00c5fdd2af5269
parent336cd4d7d7f8fdbd007045aed632537451717523
perf symbols: Remove incorrect open-coded container_of()

At least on ARM, padding is inserted between rb_node and sym in struct
symbol_name_rb_node, causing "((void *)sym) - sizeof(struct rb_node)" to
point inside rb_node rather than to the symbol_name_rb_node.  Fix this
by converting the code to use container_of().

Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <20101123163106.GA25677@debian>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c