All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kernel: Use CALLER_ADDR0 macro.
@ 2009-12-20 18:07 Thiago Farina
  2009-12-20 18:07 ` [PATCH 2/2] gfs2: " Thiago Farina
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thiago Farina @ 2009-12-20 18:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ingo Molnar, Frederic Weisbecker, Andrew Morton, Andi Kleen,
	Arjan van de Ven, Steven Rostedt, Paul E. McKenney, Yinghai Lu

Use CALLER_ADDR0 instead of (unsigned long)__builtin_return_address(0),
since this macro was created for this.

This patch was generated by:
sed -i "s/(unsigned long)__builtin_return_address(0)/CALLER_ADDR0/g" path/to/file

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
 kernel/panic.c   |    2 +-
 kernel/softirq.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 5827f7b..55b0b71 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -129,7 +129,7 @@ NORET_TYPE void panic(const char * fmt, ...)
 	{
 		unsigned long caller;
 
-		caller = (unsigned long)__builtin_return_address(0);
+		caller = CALLER_ADDR0;
 		disabled_wait(caller);
 	}
 #endif
diff --git a/kernel/softirq.c b/kernel/softirq.c
index a09502e..979e029 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -116,7 +116,7 @@ static inline void __local_bh_disable(unsigned long ip)
 
 void local_bh_disable(void)
 {
-	__local_bh_disable((unsigned long)__builtin_return_address(0));
+	__local_bh_disable(CALLER_ADDR0);
 }
 
 EXPORT_SYMBOL(local_bh_disable);
@@ -132,7 +132,7 @@ void _local_bh_enable(void)
 	WARN_ON_ONCE(!irqs_disabled());
 
 	if (softirq_count() == SOFTIRQ_OFFSET)
-		trace_softirqs_on((unsigned long)__builtin_return_address(0));
+		trace_softirqs_on(CALLER_ADDR0);
 	sub_preempt_count(SOFTIRQ_OFFSET);
 }
 
@@ -167,7 +167,7 @@ static inline void _local_bh_enable_ip(unsigned long ip)
 
 void local_bh_enable(void)
 {
-	_local_bh_enable_ip((unsigned long)__builtin_return_address(0));
+	_local_bh_enable_ip(CALLER_ADDR0);
 }
 EXPORT_SYMBOL(local_bh_enable);
 
@@ -198,7 +198,7 @@ asmlinkage void __do_softirq(void)
 	pending = local_softirq_pending();
 	account_system_vtime(current);
 
-	__local_bh_disable((unsigned long)__builtin_return_address(0));
+	__local_bh_disable(CALLER_ADDR0);
 	lockdep_softirq_enter();
 
 	cpu = smp_processor_id();
-- 
1.6.6.rc0.61.g41d5b


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-28 10:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-20 18:07 [PATCH 1/2] kernel: Use CALLER_ADDR0 macro Thiago Farina
2009-12-20 18:07 ` [PATCH 2/2] gfs2: " Thiago Farina
2009-12-21  9:22   ` [Cluster-devel] " Steven Whitehouse
2009-12-21  9:22     ` Steven Whitehouse
2009-12-21 13:43     ` [Cluster-devel] " Christoph Hellwig
2009-12-21 13:43       ` Christoph Hellwig
2009-12-20 19:03 ` [PATCH 1/2] kernel: " Andi Kleen
2009-12-28 10:10 ` [tip:core/cleanups] " tip-bot for Thiago Farina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.