diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2018-11-09 15:43:14 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2018-12-17 13:48:21 -0800 |
commit | 6a986984b63990c80252b2208036fe731a6ae113 (patch) | |
tree | 93928de818b2f3dd98d22bcb68da781d95c6d44b /arch/xtensa/kernel/signal.c | |
parent | 98c3115a4ec56f03056efd9295e0fcb4c5c57a85 (diff) | |
download | lwn-6a986984b63990c80252b2208036fe731a6ae113.tar.gz lwn-6a986984b63990c80252b2208036fe731a6ae113.zip |
xtensa: use NO_SYSCALL instead of -1
For the sake of clarity define macro NO_SYSCALL and use it for
setting/checking struct pt_regs::syscall field.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/signal.c')
-rw-r--r-- | arch/xtensa/kernel/signal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c index f88e7a0b232c..74e1682876ac 100644 --- a/arch/xtensa/kernel/signal.c +++ b/arch/xtensa/kernel/signal.c @@ -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 @@ -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: |