aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-10-03 01:18:47 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-03 04:09:13 -0400
commit69e13ad56f9e2cd81c4f8bfd6267211c10c14c08 (patch)
tree90b10ca69a1527cba94c425a83166a683c91f859 /arch/x86/kernel
parenta2e8d3dcfd420177aaa0c53aca60a869bad75f4b (diff)
x86: signal: remove indent in restore_sigcontext()
remove braces and indent for flags and fpstate in restore_sigcontext(). Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/signal_32.c21
-rw-r--r--arch/x86/kernel/signal_64.c19
2 files changed, 14 insertions, 26 deletions
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c
index 545448b7aeba..d6dd057d0f22 100644
--- a/arch/x86/kernel/signal_32.c
+++ b/arch/x86/kernel/signal_32.c
@@ -142,6 +142,8 @@ static int
142restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, 142restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
143 unsigned long *pax) 143 unsigned long *pax)
144{ 144{
145 void __user *buf;
146 unsigned int tmpflags;
145 unsigned int err = 0; 147 unsigned int err = 0;
146 148
147 /* Always make any pending restarted system calls return -EINTR */ 149 /* Always make any pending restarted system calls return -EINTR */
@@ -156,21 +158,12 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
156 COPY_SEG_STRICT(cs); 158 COPY_SEG_STRICT(cs);
157 COPY_SEG_STRICT(ss); 159 COPY_SEG_STRICT(ss);
158 160
159 { 161 err |= __get_user(tmpflags, &sc->flags);
160 unsigned int tmpflags; 162 regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
163 regs->orig_ax = -1; /* disable syscall checks */
161 164
162 err |= __get_user(tmpflags, &sc->flags); 165 err |= __get_user(buf, &sc->fpstate);
163 regs->flags = (regs->flags & ~FIX_EFLAGS) | 166 err |= restore_i387_xstate(buf);
164 (tmpflags & FIX_EFLAGS);
165 regs->orig_ax = -1; /* disable syscall checks */
166 }
167
168 {
169 void __user *buf;
170
171 err |= __get_user(buf, &sc->fpstate);
172 err |= restore_i387_xstate(buf);
173 }
174 167
175 err |= __get_user(*pax, &sc->ax); 168 err |= __get_user(*pax, &sc->ax);
176 return err; 169 return err;
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c
index feff4a91d095..a5c9627f4db9 100644
--- a/arch/x86/kernel/signal_64.c
+++ b/arch/x86/kernel/signal_64.c
@@ -69,6 +69,8 @@ static int
69restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, 69restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
70 unsigned long *pax) 70 unsigned long *pax)
71{ 71{
72 void __user *buf;
73 unsigned int tmpflags;
72 unsigned int err = 0; 74 unsigned int err = 0;
73 75
74 /* Always make any pending restarted system calls return -EINTR */ 76 /* Always make any pending restarted system calls return -EINTR */
@@ -90,19 +92,12 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc,
90 * App's signal handler can save/restore other segments if needed. */ 92 * App's signal handler can save/restore other segments if needed. */
91 COPY_SEG_STRICT(cs); 93 COPY_SEG_STRICT(cs);
92 94
93 { 95 err |= __get_user(tmpflags, &sc->flags);
94 unsigned int tmpflags; 96 regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
95 err |= __get_user(tmpflags, &sc->flags); 97 regs->orig_ax = -1; /* disable syscall checks */
96 regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
97 regs->orig_ax = -1; /* disable syscall checks */
98 }
99
100 {
101 void __user *buf;
102 98
103 err |= __get_user(buf, &sc->fpstate); 99 err |= __get_user(buf, &sc->fpstate);
104 err |= restore_i387_xstate(buf); 100 err |= restore_i387_xstate(buf);
105 }
106 101
107 err |= __get_user(*pax, &sc->ax); 102 err |= __get_user(*pax, &sc->ax);
108 return err; 103 return err;