From patchwork Fri Jan 2 18:09:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5560331 Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6CA5EBF6C3 for ; Fri, 2 Jan 2015 18:07:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 66FF92013D for ; Fri, 2 Jan 2015 18:07:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A1602011E for ; Fri, 2 Jan 2015 18:07:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752441AbbABSGw (ORCPT ); Fri, 2 Jan 2015 13:06:52 -0500 Received: from mail-wi0-f180.google.com ([209.85.212.180]:43912 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752437AbbABSGu (ORCPT ); Fri, 2 Jan 2015 13:06:50 -0500 Received: by mail-wi0-f180.google.com with SMTP id n3so28069699wiv.7 for ; Fri, 02 Jan 2015 10:06:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=FSH2F2Xq43bm3Icov4hxIYK0ijyHzCLDSdzKn8YAdAo=; b=X1K7FnHxqXmZNwdwmhUrdY3BILuvYaSNaWtxMhLJwmXFziNOhLJXVYb8DORakbtTZ4 dt7jgiUa8rzXjNMKtClA8Hx43JnYNb6gtklNHBj2Sx2J+ZHnMZCUpvnWA8xO3IIBUWpu HNSGbAZypbjRX0wIpFtxJKlr7Cq8z8s6fa6w3pAZyYQO3x5rkhMHOTUVFeBnyTxOZpHp njoHKZPlZbCZNU4CGC6IQKrgIwMWVc90STFxVzxdVQ4t1M34KX2Y/DuTPKPtM4y3ZgYq BbsEyKJf9+EMgmcxUv+DhRpNBdk4R1TLtI2Ssseb20OvTRlKma++n6jtjAH0LlYBcowB hXlA== X-Gm-Message-State: ALoCoQm6sh1vLejDRi2ehKNsOx2+nmbHTTdhgcH8u/lDwY+vvZGp5JagWScSrRSRJEORoLMYaGwJ X-Received: by 10.180.198.211 with SMTP id je19mr133598340wic.27.1420222008656; Fri, 02 Jan 2015 10:06:48 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id cp4sm65397308wjb.16.2015.01.02.10.06.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Jan 2015 10:06:47 -0800 (PST) From: Rickard Strandqvist To: "James E.J. Bottomley" , Helge Deller Cc: Rickard Strandqvist , James Hogan , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] arch: parisc: kernel: sys_parisc: Remove some unused functions Date: Fri, 2 Jan 2015 19:09:50 +0100 Message-Id: <1420222190-32621-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removes some functions that are not used anywhere: parisc_personality() parisc_fallocate() parisc_sync_file_range() parisc_fadvise64_64() parisc_readahead() parisc_pwrite64() parisc_pread64() parisc_ftruncate64() parisc_truncate64() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- arch/parisc/kernel/sys_parisc.c | 81 --------------------------------------- 1 file changed, 81 deletions(-) diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c index e1ffea2..65ab69d 100644 --- a/arch/parisc/kernel/sys_parisc.c +++ b/arch/parisc/kernel/sys_parisc.c @@ -283,18 +283,6 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, unsigned long len, /* Fucking broken ABI */ #ifdef CONFIG_64BIT -asmlinkage long parisc_truncate64(const char __user * path, - unsigned int high, unsigned int low) -{ - return sys_truncate(path, (long)high << 32 | low); -} - -asmlinkage long parisc_ftruncate64(unsigned int fd, - unsigned int high, unsigned int low) -{ - return sys_ftruncate(fd, (long)high << 32 | low); -} - /* stubs for the benefit of the syscall_table since truncate64 and truncate * are identical on LP64 */ asmlinkage long sys_truncate64(const char __user * path, unsigned long length) @@ -309,62 +297,8 @@ asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg { return sys_fcntl(fd, cmd, arg); } -#else - -asmlinkage long parisc_truncate64(const char __user * path, - unsigned int high, unsigned int low) -{ - return sys_truncate64(path, (loff_t)high << 32 | low); -} - -asmlinkage long parisc_ftruncate64(unsigned int fd, - unsigned int high, unsigned int low) -{ - return sys_ftruncate64(fd, (loff_t)high << 32 | low); -} #endif -asmlinkage ssize_t parisc_pread64(unsigned int fd, char __user *buf, size_t count, - unsigned int high, unsigned int low) -{ - return sys_pread64(fd, buf, count, (loff_t)high << 32 | low); -} - -asmlinkage ssize_t parisc_pwrite64(unsigned int fd, const char __user *buf, - size_t count, unsigned int high, unsigned int low) -{ - return sys_pwrite64(fd, buf, count, (loff_t)high << 32 | low); -} - -asmlinkage ssize_t parisc_readahead(int fd, unsigned int high, unsigned int low, - size_t count) -{ - return sys_readahead(fd, (loff_t)high << 32 | low, count); -} - -asmlinkage long parisc_fadvise64_64(int fd, - unsigned int high_off, unsigned int low_off, - unsigned int high_len, unsigned int low_len, int advice) -{ - return sys_fadvise64_64(fd, (loff_t)high_off << 32 | low_off, - (loff_t)high_len << 32 | low_len, advice); -} - -asmlinkage long parisc_sync_file_range(int fd, - u32 hi_off, u32 lo_off, u32 hi_nbytes, u32 lo_nbytes, - unsigned int flags) -{ - return sys_sync_file_range(fd, (loff_t)hi_off << 32 | lo_off, - (loff_t)hi_nbytes << 32 | lo_nbytes, flags); -} - -asmlinkage long parisc_fallocate(int fd, int mode, u32 offhi, u32 offlo, - u32 lenhi, u32 lenlo) -{ - return sys_fallocate(fd, mode, ((u64)offhi << 32) | offlo, - ((u64)lenhi << 32) | lenlo); -} - asmlinkage unsigned long sys_alloc_hugepages(int key, unsigned long addr, unsigned long len, int prot, int flag) { return -ENOMEM; @@ -374,18 +308,3 @@ asmlinkage int sys_free_hugepages(unsigned long addr) { return -EINVAL; } - -long parisc_personality(unsigned long personality) -{ - long err; - - if (personality(current->personality) == PER_LINUX32 - && personality(personality) == PER_LINUX) - personality = (personality & ~PER_MASK) | PER_LINUX32; - - err = sys_personality(personality); - if (personality(err) == PER_LINUX32) - err = (err & ~PER_MASK) | PER_LINUX; - - return err; -}