All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions
@ 2018-08-01 18:22 Nick Desaulniers
  2018-08-01 20:10 ` John David Anglin
  0 siblings, 1 reply; 17+ messages in thread
From: Nick Desaulniers @ 2018-08-01 18:22 UTC (permalink / raw)
  To: deller, jejb
  Cc: natechancellor, Nick Desaulniers, Thomas Gleixner, Pravin Shedge,
	Kate Stewart, Greg Kroah-Hartman, linux-parisc, linux-kernel

As part of the effort to reduce the code duplication between _THIS_IP_
and current_text_addr(), let's consolidate callers of
current_text_addr() to use _THIS_IP_.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/parisc/kernel/unwind.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index 2ef83d78eec4..a4b430f440a9 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -439,8 +439,8 @@ unsigned long return_address(unsigned int level)
 	/* initialize unwind info */
 	asm volatile ("copy %%r30, %0" : "=r"(sp));
 	memset(&r, 0, sizeof(struct pt_regs));
-	r.iaoq[0] = (unsigned long) current_text_addr();
-	r.gr[2] = (unsigned long) __builtin_return_address(0);
+	r.iaoq[0] = _THIS_IP_;
+	r.gr[2] = _RET_IP_;
 	r.gr[30] = sp;
 	unwind_frame_init(&info, current, &r);
 
-- 
2.18.0.597.ga71716f1ad-goog

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

end of thread, other threads:[~2018-08-07 21:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 18:22 [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions Nick Desaulniers
2018-08-01 20:10 ` John David Anglin
2018-08-01 20:52   ` Nick Desaulniers
2018-08-01 21:27     ` John David Anglin
2018-08-01 21:49       ` Nick Desaulniers
2018-08-01 22:12         ` John David Anglin
2018-08-01 22:18           ` Nick Desaulniers
2018-08-02  0:49             ` John David Anglin
2018-08-02 20:31               ` Nick Desaulniers
2018-08-03 17:57                 ` John David Anglin
2018-08-03 18:11                   ` Nick Desaulniers
2018-08-03 19:09                     ` John David Anglin
2018-08-03 20:33                       ` Nick Desaulniers
2018-08-03 22:34                         ` Helge Deller
2018-08-07 18:11                           ` Nick Desaulniers
2018-08-07 20:30                             ` Helge Deller
2018-08-07 21:29                               ` Nick Desaulniers

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.