Commit e2764a1e authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Andi Kleen

[PATCH] x86-64: use BUILD_BUG_ON in FPU code

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 42ed458a
...@@ -82,11 +82,8 @@ int save_i387(struct _fpstate __user *buf) ...@@ -82,11 +82,8 @@ int save_i387(struct _fpstate __user *buf)
struct task_struct *tsk = current; struct task_struct *tsk = current;
int err = 0; int err = 0;
{ BUILD_BUG_ON(sizeof(struct user_i387_struct) !=
extern void bad_user_i387_struct(void); sizeof(tsk->thread.i387.fxsave));
if (sizeof(struct user_i387_struct) != sizeof(tsk->thread.i387.fxsave))
bad_user_i387_struct();
}
if ((unsigned long)buf % 16) if ((unsigned long)buf % 16)
printk("save_i387: bad fpstate %p\n",buf); printk("save_i387: bad fpstate %p\n",buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment