]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: ia32_signal: cleanup macro RELOAD_SEG
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Mon, 17 Nov 2008 23:47:48 +0000 (15:47 -0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 18 Nov 2008 15:55:35 +0000 (16:55 +0100)
Impact: cleanup

Remove mask parameter because it's always 3.
Cleanup coding styles.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Reviewed-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/ia32/ia32_signal.c

index fe44c314c9c0aa031291ee053d683c243613f6e1..2c56e6857d1a13f1f0d75d108fdd22c2bdeac8db 100644 (file)
@@ -207,13 +207,14 @@ struct rt_sigframe
                regs->seg = tmp | 3;                    \
 }
 
-#define RELOAD_SEG(seg,mask)                                           \
-       { unsigned int cur;                                             \
-         unsigned short pre;                                           \
-         err |= __get_user(pre, &sc->seg);                             \
-         savesegment(seg, cur);                                        \
-         pre |= mask;                                                  \
-         if (pre != cur) loadsegment(seg, pre); }
+#define RELOAD_SEG(seg)                {               \
+       unsigned int cur, pre;                  \
+       err |= __get_user(pre, &sc->seg);       \
+       savesegment(seg, cur);                  \
+       pre |= 3;                               \
+       if (pre != cur)                         \
+               loadsegment(seg, pre);          \
+}
 
 static int ia32_restore_sigcontext(struct pt_regs *regs,
                                   struct sigcontext_ia32 __user *sc,
@@ -244,9 +245,9 @@ static int ia32_restore_sigcontext(struct pt_regs *regs,
        if (gs != oldgs)
                load_gs_index(gs);
 
-       RELOAD_SEG(fs, 3);
-       RELOAD_SEG(ds, 3);
-       RELOAD_SEG(es, 3);
+       RELOAD_SEG(fs);
+       RELOAD_SEG(ds);
+       RELOAD_SEG(es);
 
        COPY(di); COPY(si); COPY(bp); COPY(sp); COPY(bx);
        COPY(dx); COPY(cx); COPY(ip);