[PATCH ?] ACPI: pr->id is unsigned

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: roel kluin
Date: Monday, September 15, 2008 - 6:32 pm

since pr->id is unsigned, shouldn't something like
the patch below be applied?

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index e36422a..75c0f76 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -667,7 +667,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
 		return 0;
 	}
 
-	BUG_ON((pr->id >= nr_cpu_ids) || (pr->id < 0));
+	BUG_ON((pr->id >= nr_cpu_ids) || ((unsigned long)pr->id < 0));
 
 	/*
 	 * Buggy BIOS check
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH ?] ACPI: pr-&gt;id is unsigned, Valdis.Kletnieks, (Mon Sep 15, 1:26 pm)
[PATCH ?] ACPI: pr->id is unsigned, roel kluin, (Mon Sep 15, 6:32 pm)
Re: [PATCH ?] ACPI: pr-&gt;id is unsigned, Thomas Renninger, (Tue Sep 16, 1:45 am)