diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-05-25 01:10:27 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-25 01:10:27 -0700 |
| commit | 05cdeac3efd3bbffd5f01a1822c4f941e19ba31d (patch) | |
| tree | 384823cbfb12ae5465d09a8a979181859a760762 | |
| parent | 2a52198be4817db0a6f20271e84bda53e89a4b93 (diff) | |
[PATCH] arch/i386/kernel/mpparse.c warning fixes
From: William Lee Irwin III <wli@holomorphy.com>
mpc_apicid is a u8, and MAX_APICS can be 256.
| -rw-r--r-- | arch/i386/kernel/mpparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 5e0276d43425..88e9ad4409df 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c @@ -171,7 +171,7 @@ void __init MP_processor_info (struct mpc_config_processor *m) num_processors++; - if (m->mpc_apicid > MAX_APICS) { + if (MAX_APICS - m->mpc_apicid <= 0) { printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", m->mpc_apicid, MAX_APICS); --num_processors; @@ -803,7 +803,7 @@ void __init mp_register_lapic ( struct mpc_config_processor processor; int boot_cpu = 0; - if (id >= MAX_APICS) { + if (MAX_APICS - id <= 0) { printk(KERN_WARNING "Processor #%d invalid (max %d)\n", id, MAX_APICS); return; |
