qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 04/19] pc: cpu: consolidate apic-id validity


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v3 04/19] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug()
Date: Wed, 20 Jul 2016 12:12:35 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

On Wed, Jul 06, 2016 at 08:20:40AM +0200, Igor Mammedov wrote:
> +        error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists",
> +                   cpu_slot - pcms->possible_cpus->cpus,
> +                   cpu->apic_id);

Build error on 32-bit reported by Peter Maydell:

/home/petmay01/qemu/hw/i386/pc.c: In function 'pc_cpu_pre_plug':
/home/petmay01/qemu/hw/i386/pc.c:1926:9: error: format '%ld' expects
argument of type 'long int', but argument 6 has type 'int'
[-Werror=format=]
         error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists",
         ^
cc1: all warnings being treated as errors


I have fixed this on git, with:

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index cf518ac..ac7a4d5 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1923,9 +1923,8 @@ static void pc_cpu_pre_plug(HotplugHandler *hotplug_dev,
     }
 
     if (cpu_slot->cpu) {
-        error_setg(errp, "CPU[%ld] with APIC ID %" PRIu32 " exists",
-                   cpu_slot - pcms->possible_cpus->cpus,
-                   cpu->apic_id);
+        error_setg(errp, "CPU[%d] with APIC ID %" PRIu32 " exists",
+                   idx, cpu->apic_id);
         return;
     }
 
-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]