public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: James Hogan <james.hogan@imgtec.com>,
	linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch: parisc: kernel: sys_parisc:  Remove some unused functions
Date: Fri, 02 Jan 2015 19:12:35 +0100	[thread overview]
Message-ID: <54A6DF93.9000608@gmx.de> (raw)
In-Reply-To: <1420222190-32621-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

On 01/02/2015 07:09 PM, Rickard Strandqvist wrote:
> 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.

NAK.

Those functions implement syscalls specific to the parisc ABI.
They are referenced in the syscall table which gets generated by the ENTRY_OURS()
macro in arch/parisc/kernel/syscall_table.S

Helge

>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>   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;
> -}
>


  reply	other threads:[~2015-01-02 18:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-02 18:09 [PATCH] arch: parisc: kernel: sys_parisc: Remove some unused functions Rickard Strandqvist
2015-01-02 18:12 ` Helge Deller [this message]
2015-01-02 18:14 ` Al Viro

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=54A6DF93.9000608@gmx.de \
    --to=deller@gmx.de \
    --cc=james.hogan@imgtec.com \
    --cc=jejb@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=rickard_strandqvist@spectrumdigital.se \
    /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