From: Akinobu Mita Date: Sat, 19 Apr 2008 14:55:11 +0000 (+0900) Subject: x86: use BUILD_BUG_ON() for the size of struct intel_mp_floating X-Git-Tag: v2.6.26-rc1~1045^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5d47a271f38cf2ba7299047ad0bf3ac7e4c4a214;p=linux-2.6-omap-h63xx.git x86: use BUILD_BUG_ON() for the size of struct intel_mp_floating Use BUILD_BUG_ON() instead of compile-time error technique with extern non-exsistent function. Signed-off-by: Akinobu Mita Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 70744e344fa..101b13cab68 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -686,13 +686,11 @@ void __init get_smp_config(void) static int __init smp_scan_config(unsigned long base, unsigned long length, unsigned reserve) { - extern void __bad_mpf_size(void); unsigned int *bp = phys_to_virt(base); struct intel_mp_floating *mpf; Dprintk("Scan SMP from %p for %ld bytes.\n", bp, length); - if (sizeof(*mpf) != 16) - __bad_mpf_size(); + BUILD_BUG_ON(sizeof(*mpf) != 16); while (length > 0) { mpf = (struct intel_mp_floating *)bp;