From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbbGOHh1 (ORCPT ); Wed, 15 Jul 2015 03:37:27 -0400 Received: from ozlabs.org ([103.22.144.67]:33001 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752081AbbGOHhY (ORCPT ); Wed, 15 Jul 2015 03:37:24 -0400 From: Michael Ellerman To: Cc: , keescook@chromium.org, luto@amacapital.net, wad@chromium.org, strosake@linux.vnet.ibm.com, bogdan.purcareata@freescale.com Subject: [RFC PATCH 04/12] powerpc: Drop unused syscall_get_error() Date: Wed, 15 Jul 2015 17:37:06 +1000 Message-Id: <1436945834-26660-4-git-send-email-mpe@ellerman.id.au> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1436945834-26660-1-git-send-email-mpe@ellerman.id.au> References: <1436945834-26660-1-git-send-email-mpe@ellerman.id.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/powerpc/include/asm/syscall.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h index ff21b7a2f0cc..c6239dabcfb1 100644 --- a/arch/powerpc/include/asm/syscall.h +++ b/arch/powerpc/include/asm/syscall.h @@ -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) { -- 2.1.0