Remove 'type' argument from access_ok() function
[sfrench/cifs-2.6.git] / arch / xtensa / kernel / signal.c
index f88e7a0b232cbd09241a0393ca5db193b661d8c9..dc22a238ed9c18d59f8d2721cc1fab16b41bfdae 100644 (file)
@@ -185,13 +185,13 @@ restore_sigcontext(struct pt_regs *regs, struct rt_sigframe __user *frame)
        COPY(sar);
 #undef COPY
 
-       /* All registers were flushed to stack. Start with a prestine frame. */
+       /* All registers were flushed to stack. Start with a pristine frame. */
 
        regs->wmask = 1;
        regs->windowbase = 0;
        regs->windowstart = 1;
 
-       regs->syscall = -1;             /* disable syscall checks */
+       regs->syscall = NO_SYSCALL;     /* disable syscall checks */
 
        /* For PS, restore only PS.CALLINC.
         * Assume that all other bits are either the same as for the signal
@@ -251,7 +251,7 @@ asmlinkage long xtensa_rt_sigreturn(long a0, long a1, long a2, long a3,
 
        frame = (struct rt_sigframe __user *) regs->areg[1];
 
-       if (!access_ok(VERIFY_READ, frame, sizeof(*frame)))
+       if (!access_ok(frame, sizeof(*frame)))
                goto badframe;
 
        if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
@@ -348,7 +348,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
        if (regs->depc > 64)
                panic ("Double exception sys_sigreturn\n");
 
-       if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) {
+       if (!access_ok(frame, sizeof(*frame))) {
                return -EFAULT;
        }
 
@@ -423,7 +423,7 @@ static void do_signal(struct pt_regs *regs)
 
                /* Are we from a system call? */
 
-               if ((signed)regs->syscall >= 0) {
+               if (regs->syscall != NO_SYSCALL) {
 
                        /* If so, check system call restarting.. */
 
@@ -462,7 +462,7 @@ static void do_signal(struct pt_regs *regs)
        }
 
        /* Did we come from a system call? */
-       if ((signed) regs->syscall >= 0) {
+       if (regs->syscall != NO_SYSCALL) {
                /* Restart the system call - no handlers present */
                switch (regs->areg[2]) {
                case -ERESTARTNOHAND: