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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Valdis.Kletnieks
Date: Monday, September 15, 2008 - 1:26 pm

On Mon, 15 Sep 2008 21:32:20 EDT, roel kluin said:


Under what conditions will the clause "(unsigned long)pr->id < 0)" be true,
and when will it be false?  What will any sane optimizing compiler do?

And *sometimes*, the *real* bug is that pr->id should be a signed quantity,
not an unsigned one, and the cast is just papering over the issue.

In other words, the original line is almost certainly buggy.  However, this
isn't the right fix.  Somebody who actually understands the code will have to
decide what *should* be happening here (that's beyond my understanding of that
code)...
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH ?] ACPI: pr->id is unsigned, Valdis.Kletnieks, (Mon Sep 15, 1:26 pm)
[PATCH ?] ACPI: pr-&gt;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)