Merge branch 'for-linus-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / alpha / kernel / osf_sys.c
index cff52d8ffdb12656070a4c5e73f5dad376cd9f86..792586038808c1b6633ddc927fc1425a1d8bdaa7 100644 (file)
@@ -529,7 +529,6 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path,
 
 SYSCALL_DEFINE1(osf_utsname, char __user *, name)
 {
-       int error;
        char tmp[5 * 32];
 
        down_read(&uts_sem);
@@ -560,7 +559,7 @@ SYSCALL_DEFINE0(getdtablesize)
  */
 SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)
 {
-       int len, err = 0;
+       int len;
        char *kname;
        char tmp[32];
 
@@ -1343,7 +1342,6 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr,
 }
 
 #ifdef CONFIG_OSF4_COMPAT
-
 /* Clear top 32 bits of iov_len in the user's buffer for
    compatibility with old versions of OSF/1 where iov_len
    was defined as int. */
@@ -1360,27 +1358,31 @@ osf_fix_iov_len(const struct iovec __user *iov, unsigned long count)
        }
        return 0;
 }
+#endif
 
 SYSCALL_DEFINE3(osf_readv, unsigned long, fd,
                const struct iovec __user *, vector, unsigned long, count)
 {
+#ifdef CONFIG_OSF4_COMPAT
        if (unlikely(personality(current->personality) == PER_OSF4))
                if (osf_fix_iov_len(vector, count))
                        return -EFAULT;
+#endif
+
        return sys_readv(fd, vector, count);
 }
 
 SYSCALL_DEFINE3(osf_writev, unsigned long, fd,
                const struct iovec __user *, vector, unsigned long, count)
 {
+#ifdef CONFIG_OSF4_COMPAT
        if (unlikely(personality(current->personality) == PER_OSF4))
                if (osf_fix_iov_len(vector, count))
                        return -EFAULT;
+#endif
        return sys_writev(fd, vector, count);
 }
 
-#endif
-
 SYSCALL_DEFINE2(osf_getpriority, int, which, int, who)
 {
        int prio = sys_getpriority(which, who);