parisc: prefer _THIS_IP_ and _RET_IP_ statement expressions
authorNick Desaulniers <ndesaulniers@google.com>
Wed, 1 Aug 2018 18:22:56 +0000 (11:22 -0700)
committerHelge Deller <deller@gmx.de>
Mon, 13 Aug 2018 07:30:59 +0000 (09:30 +0200)
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>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/unwind.c

index 2ef83d78eec42bd3ad55a3c2e0f976e081417266..a4b430f440a91b095ffd98cd587121e3ae2b39c9 100644 (file)
@@ -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);