Commit-ID: 8299c063bfa238da87fbdd15b1c3a31ca6e8ff74 Gitweb: http://git.kernel.org/tip/8299c063bfa238da87fbdd15b1c3a31ca6e8ff74 Author: Sasha Levin <sasha.levin@xxxxxxxxxx> AuthorDate: Sat, 9 Feb 2013 19:39:37 -0500 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Mon, 11 Feb 2013 10:12:39 +0100 liblockdep: Prevent multiple declarations of CALLER_ADDR0 They are declared once in the public and once in the private headers, prevent declaring them twice if both headers are used. Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx> Cc: jamie.iles@xxxxxxxxxx Cc: penberg@xxxxxxxxxx Cc: acme@xxxxxxxxxxxxxxxxxx Cc: paulus@xxxxxxxxx Cc: namhyung@xxxxxxxxxx Cc: peterz@xxxxxxxxxxxxx Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Link: http://lkml.kernel.org/r/1360456781-32462-7-git-send-email-sasha.levin@xxxxxxxxxx Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- tools/lib/lockdep/include/liblockdep/common.h | 3 +++ tools/lib/lockdep/uinclude/linux/kernel.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tools/lib/lockdep/include/liblockdep/common.h b/tools/lib/lockdep/include/liblockdep/common.h index a675ef0..1bad66c 100644 --- a/tools/lib/lockdep/include/liblockdep/common.h +++ b/tools/lib/lockdep/include/liblockdep/common.h @@ -3,8 +3,11 @@ #include <pthread.h> +#ifndef CALLER_ADDR0 #define CALLER_ADDR0 (__builtin_return_address(0)) #define _THIS_IP_ CALLER_ADDR0 +#endif + #define NR_LOCKDEP_CACHING_CLASSES 2 #define MAX_LOCKDEP_SUBCLASSES 8UL diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h index da97ce8..af02ac1 100644 --- a/tools/lib/lockdep/uinclude/linux/kernel.h +++ b/tools/lib/lockdep/uinclude/linux/kernel.h @@ -28,7 +28,9 @@ #define noinline #define list_add_tail_rcu list_add_tail +#ifndef CALLER_ADDR0 #define _THIS_IP_ CALLER_ADDR0 #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) +#endif #endif -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html