lkml.org 
[lkml]   [2008]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 01/10] 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 <akinobu.mita@gmail.com>
---
arch/x86/kernel/mpparse.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: 2.6-git/arch/x86/kernel/mpparse.c
===================================================================
--- 2.6-git.orig/arch/x86/kernel/mpparse.c
+++ 2.6-git/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;
--


\
 
 \ /
  Last update: 2008-04-19 17:09    [W:7.226 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site