Skip to content

Commit

Permalink
sparc: no need to sign-extend in sync_file_range() wrapper
Browse files Browse the repository at this point in the history
the first argument will be sign-extended by sys_sync_file_range()
SYSCALL_DEFINE-generate wrapper; the last argument is unsigned int,
so the same wrapper will will truncate it anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 4, 2013
1 parent 728ee06 commit 2ae80c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion arch/sparc/kernel/sys32.S
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5)
SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0)
SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)
SIGN2(sys32_sync_file_range, compat_sync_file_range, %o0, %o5)

.globl sys32_mmap2
sys32_mmap2:
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/sys_sparc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ long compat_sys_fadvise64_64(int fd,
advice);
}

long compat_sync_file_range(int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, int flags)
long sys32_sync_file_range(unsigned int fd, unsigned long off_high, unsigned long off_low, unsigned long nb_high, unsigned long nb_low, unsigned int flags)
{
return sys_sync_file_range(fd,
(off_high << 32) | off_low,
Expand Down

0 comments on commit 2ae80c4

Please sign in to comment.