mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: akpm@digeo.com
Cc: linux-kernel@vger.kernel.org
Subject: arch/i386/kernel/mpparse.c warning fixes
Date: Thu, 22 May 2003 08:53:20 -0700	[thread overview]
Message-ID: <20030522155320.GP29926@holomorphy.com> (raw)

diff -prauN mm8-2.5.69-1/arch/i386/kernel/mpparse.c mm8-2.5.69-2/arch/i386/kernel/mpparse.c
--- mm8-2.5.69-1/arch/i386/kernel/mpparse.c	2003-05-22 04:54:48.000000000 -0700
+++ mm8-2.5.69-2/arch/i386/kernel/mpparse.c	2003-05-22 08:06:13.000000000 -0700
@@ -171,7 +171,7 @@ void __init MP_processor_info (struct mp
 
 	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;

             reply	other threads:[~2003-05-22 15:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 15:53 William Lee Irwin III [this message]
2003-05-22 16:07 ` mikpe
2003-05-22 16:23   ` William Lee Irwin III
2003-05-22 18:29     ` mikpe
2003-05-22 18:36       ` William Lee Irwin III
2003-05-22 18:49         ` mikpe
2003-05-22 18:59           ` William Lee Irwin III
2003-05-22 19:03             ` mikpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030522155320.GP29926@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®