Skip to content

Commit

Permalink
powerpc: Drop unused syscall_get_error()
Browse files Browse the repository at this point in the history
syscall_get_error() is unused, and never has been.

It's also probably wrong, as it negates r3 before returning it, but that
depends on what the caller is expecting.

It also doesn't deal with compat, and doesn't deal with TIF_NOERROR.

Although we could fix those, until it has a caller and it's clear what
semantics the caller wants it's just untested code. So drop it.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Kees Cook <keescook@chromium.org>
  • Loading branch information
Michael Ellerman committed Jul 29, 2015
1 parent d383741 commit 2923e6d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions arch/powerpc/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ static inline void syscall_rollback(struct task_struct *task,
regs->gpr[3] = regs->orig_gpr3;
}

static inline long syscall_get_error(struct task_struct *task,
struct pt_regs *regs)
{
return (regs->ccr & 0x10000000) ? -regs->gpr[3] : 0;
}

static inline long syscall_get_return_value(struct task_struct *task,
struct pt_regs *regs)
{
Expand Down

0 comments on commit 2923e6d

Please sign in to comment.