x86: ia32_signal: cleanup macro RELOAD_SEG

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>
This commit is contained in:
Hiroshi Shimamoto
2008-11-17 15:47:48 -08:00
committed by Ingo Molnar
parent d71a68dca5
commit 8c6e5ce0fd

View File

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