From: Alexey Dobriyan Date: Thu, 7 Dec 2006 01:14:01 +0000 (+0100) Subject: [PATCH] x86-64: use BUILD_BUG_ON in FPU code X-Git-Tag: v2.6.20-rc1~145^2^2~8^2~142 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e2764a1e306c986053a52b33748c33463cf888de;p=linux-2.6-omap-h63xx.git [PATCH] x86-64: use BUILD_BUG_ON in FPU code Signed-off-by: Alexey Dobriyan Signed-off-by: Andi Kleen Cc: Andi Kleen Signed-off-by: Andrew Morton --- diff --git a/arch/x86_64/kernel/i387.c b/arch/x86_64/kernel/i387.c index 3aa1e9bb781..1d58c13bc6b 100644 --- a/arch/x86_64/kernel/i387.c +++ b/arch/x86_64/kernel/i387.c @@ -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);