Skip to content

Commit

Permalink
x86: use BUILD_BUG_ON() for the size of struct intel_mp_floating
Browse files Browse the repository at this point in the history
Use BUILD_BUG_ON() instead of compile-time error technique with
extern non-exsistent function.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Akinobu Mita authored and Ingo Molnar committed Apr 26, 2008
1 parent 562b80b commit 5d47a27
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5d47a27

Please sign in to comment.