Received: from eggs.gnu.org ([208.118.235.92]:33182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMdZn-0000Lw-7u for qemu-devel@nongnu.org; Fri, 12 Oct 2012 07:38:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMdZk-00081K-Tu for qemu-devel@nongnu.org; Fri, 12 Oct 2012 07:38:47 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:57335 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMdZk-00080H-N0 for qemu-devel@nongnu.org; Fri, 12 Oct 2012 07:38:44 -0400 From: Peter Maydell Date: Fri, 12 Oct 2012 12:38:25 +0100 Message-Id: <1350041912-12595-3-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1350041912-12595-1-git-send-email-peter.maydell@linaro.org> References: <1350041912-12595-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 2/9] hw/arm_gic.c: Fix improper DPRINTF output. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Paul Brook From: Evgeny Voevodin s->cpu_enabled is an array, so s->cpu_enabled ? "En" : "Dis" returns "En" always. We should use s->cpu_enabled[cpu] here. Signed-off-by: Evgeny Voevodin Signed-off-by: Peter Maydell --- hw/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm_gic.c b/hw/arm_gic.c index 55871fa..4024dae 100644 --- a/hw/arm_gic.c +++ b/hw/arm_gic.c @@ -566,7 +566,7 @@ static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value) switch (offset) { case 0x00: /* Control */ s->cpu_enabled[cpu] = (value & 1); - DPRINTF("CPU %d %sabled\n", cpu, s->cpu_enabled ? "En" : "Dis"); + DPRINTF("CPU %d %sabled\n", cpu, s->cpu_enabled[cpu] ? "En" : "Dis"); break; case 0x04: /* Priority mask */ s->priority_mask[cpu] = (value & 0xff); -- 1.7.9.5