From: Nick Desaulniers <ndesaulniers@google.com>
To: deller@gmx.de, jejb@parisc-linux.org
Cc: natechancellor@gmail.com,
Nick Desaulniers <ndesaulniers@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Pravin Shedge <pravin.shedge4linux@gmail.com>,
Kate Stewart <kstewart@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions
Date: Wed, 1 Aug 2018 11:22:56 -0700 [thread overview]
Message-ID: <20180801182258.17834-1-ndesaulniers@google.com> (raw)
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
next reply other threads:[~2018-08-01 18:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-01 18:22 Nick Desaulniers [this message]
2018-08-01 20:10 ` [PATCH] parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180801182258.17834-1-ndesaulniers@google.com \
--to=ndesaulniers@google.com \
--cc=deller@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@parisc-linux.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=natechancellor@gmail.com \
--cc=pravin.shedge4linux@gmail.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).