From patchwork Fri Jan 11 15:36:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 211368 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 735192C00EC for ; Sat, 12 Jan 2013 02:37:32 +1100 (EST) Received: from localhost ([::1]:43475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ttgfi-0005ty-Ii for incoming@patchwork.ozlabs.org; Fri, 11 Jan 2013 10:37:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtgfS-0005j3-B9 for qemu-devel@nongnu.org; Fri, 11 Jan 2013 10:37:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtgfM-00026j-8I for qemu-devel@nongnu.org; Fri, 11 Jan 2013 10:37:14 -0500 Received: from 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:1d0::1]:59991 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtgfM-00025Z-0b for qemu-devel@nongnu.org; Fri, 11 Jan 2013 10:37:08 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Ttgf9-0006L0-QY; Fri, 11 Jan 2013 15:36:55 +0000 From: Peter Maydell To: Aurelien Jarno , Blue Swirl Date: Fri, 11 Jan 2013 15:36:54 +0000 Message-Id: <1357918615-24337-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1357918615-24337-1-git-send-email-peter.maydell@linaro.org> References: <1357918615-24337-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: qemu-devel@nongnu.org, Paul Brook Subject: [Qemu-devel] [PATCH 1/2] target-arm: use type_register() instead of type_register_static() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Eduardo Habkost The type_register_static() interface is documented as: type_register_static: @info: The #TypeInfo of the new type. @info and all of the strings it points to should exist for the life time that the type is registered. But cpu_register() uses a stack variable for the 'info' argument, so it has to use type_register() instead of type_register_static(). Signed-off-by: Eduardo Habkost Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target-arm/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/cpu.c b/target-arm/cpu.c index 17875ed..94536bb 100644 --- a/target-arm/cpu.c +++ b/target-arm/cpu.c @@ -778,7 +778,7 @@ static void cpu_register(const ARMCPUInfo *info) .class_size = sizeof(ARMCPUClass), }; - type_register_static(&type_info); + type_register(&type_info); } static const TypeInfo arm_cpu_type_info = {