From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utxfh-00067z-VE for qemu-devel@nongnu.org; Tue, 02 Jul 2013 06:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utxfe-0007JX-7i for qemu-devel@nongnu.org; Tue, 02 Jul 2013 06:18:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40016 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utxfd-0007J6-Vl for qemu-devel@nongnu.org; Tue, 02 Jul 2013 06:18:50 -0400 Message-ID: <51D2A905.2080708@suse.de> Date: Tue, 02 Jul 2013 12:18:45 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1372756315-17437-1-git-send-email-elta.era@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target-openrisc: Add typename for CPU models. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jia Liu Cc: Dongxue Zhang , qemu-devel Hi Jia, Am 02.07.2013 11:29, schrieb Jia Liu: > On Tue, Jul 2, 2013 at 5:11 PM, Dongxue Zhang > wrote: >> >> Make target-openrisc running OK by add typename in > openrisc_cpu_class_by_name(). >> >> Signed-off-by: Dongxue Zhang > >> --- >> target-openrisc/cpu.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c >> index fd90d37..d38c28b 100644 >> --- a/target-openrisc/cpu.c >> +++ b/target-openrisc/cpu.c >> @@ -96,12 +96,14 @@ static void openrisc_cpu_initfn(Object *obj) >> static ObjectClass *openrisc_cpu_class_by_name(const char *cpu_model) >> { >> ObjectClass *oc; >> + char *typename; >> >> if (cpu_model =3D=3D NULL) { >> return NULL; >> } >> >> - oc =3D object_class_by_name(cpu_model); >> + typename =3D g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); >> + oc =3D object_class_by_name(typename); >> if (oc !=3D NULL && (!object_class_dynamic_cast(oc, > TYPE_OPENRISC_CPU) || >> object_class_is_abstract(oc))) { >> return NULL; >=20 > Thanks for your fix, it looks and test good to me. Sorry for the breakage. Do you want to add a Reviewed-by/Tested-by/Acked-by? I'd queue it for you then. If you could upload a Linux test image somewhere that may help avoid breakages in the future. Also we reported that there was no maintainer for target-openrisc/ in MAINTAINERS file, do you want to put yourself there so that you are CC'ed on patches? Here's a pointer to the latest refactoring that partially affects or32: http://lists.gnu.org/archive/html/qemu-devel/2013-06/msg05354.html Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg