This patch addresses some feedback sent by Laszlo[1] on the non-contiguous APIC ID patches I have sent recently.
- (1 << 31) is undefined for 32-bit signed ints - Use !! on the returned value, so the function return value can be an int without a unsigned -> signed conversion
[] http://article.gmane.org/gmane.comp.emulators.qemu/162163
Cc: Laszlo Ersek lersek@redhat.com Signed-off-by: Eduardo Habkost ehabkost@redhat.com --- src/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/smp.c b/src/smp.c index 3c36f8c..4975412 100644 --- a/src/smp.c +++ b/src/smp.c @@ -77,7 +77,7 @@ ASM16(
int apic_id_is_present(u8 apic_id) { - return FoundAPICIDs[apic_id/32] & (1 << (apic_id % 32)); + return !!(FoundAPICIDs[apic_id/32] & (1ul << (apic_id % 32))); }
// find and initialize the CPUs by launching a SIPI to them
On Fri, Aug 31, 2012 at 03:11:16PM -0300, Eduardo Habkost wrote:
This patch addresses some feedback sent by Laszlo[1] on the non-contiguous APIC ID patches I have sent recently.
Thanks. I applied this.
-Kevin