Skip to content

Commit

Permalink
[PATCH] x86-64: use BUILD_BUG_ON in FPU code
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
  • Loading branch information
Alexey Dobriyan authored and Andi Kleen committed Dec 7, 2006
1 parent 42ed458 commit e2764a1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/x86_64/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ int save_i387(struct _fpstate __user *buf)
struct task_struct *tsk = current;
int err = 0;

{
extern void bad_user_i387_struct(void);
if (sizeof(struct user_i387_struct) != sizeof(tsk->thread.i387.fxsave))
bad_user_i387_struct();
}
BUILD_BUG_ON(sizeof(struct user_i387_struct) !=
sizeof(tsk->thread.i387.fxsave));

if ((unsigned long)buf % 16)
printk("save_i387: bad fpstate %p\n",buf);
Expand Down

0 comments on commit e2764a1

Please sign in to comment.