From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiAG6-00048k-6m for qemu-devel@nongnu.org; Mon, 10 Dec 2012 15:47:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TiAG5-00039t-4a for qemu-devel@nongnu.org; Mon, 10 Dec 2012 15:47:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TiAG4-00039n-Rq for qemu-devel@nongnu.org; Mon, 10 Dec 2012 15:47:25 -0500 Date: Mon, 10 Dec 2012 21:47:12 +0100 From: Igor Mammedov Message-ID: <20121210214712.58f53e14@thinkpad.mammed.net> In-Reply-To: <50C23CB9.2020508@suse.de> References: <1354828325-16568-1-git-send-email-imammedo@redhat.com> <1354828325-16568-3-git-send-email-imammedo@redhat.com> <50C23CB9.2020508@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_unit_suffixed_int() to parse tsc_freq property value List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, ehabkost@redhat.com On Fri, 07 Dec 2012 20:00:09 +0100 Andreas F=C3=A4rber wrote: > Am 06.12.2012 22:12, schrieb Igor Mammedov: > > Signed-off-by: Igor Mammedov > > --- > > v2: > > - replace visit_type_freq() with visit_type_unit_suffixed_int() > > in x86_cpuid_set_tsc_freq() > > --- > > target-i386/cpu.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > > index c6c2ca0..b7f0aba 100644 > > --- a/target-i386/cpu.c > > +++ b/target-i386/cpu.c > > @@ -1195,7 +1195,7 @@ static void x86_cpuid_set_tsc_freq(Object *obj, V= isitor *v, void *opaque, > > const int64_t max =3D INT64_MAX; > > int64_t value; > > =20 > > - visit_type_int(v, &value, name, errp); > > + visit_type_unit_suffixed_int(v, &value, name, 1000, errp); > > if (error_is_set(errp)) { > > return; > > } >=20 > This trivial usage is fine obviously. But since this series set out to > make things more generic I am missing at least one use case for 1024. > Does nothing like that exist in qdev-properties.c or so already? It would be nice to have qdev property for this, perhaps after cpu properti= es series we could introduce it and simplify target-i386/cpu.c code a bit. >=20 > Andreas >=20 > --=20 > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3= =BCrnberg >=20 --=20 Regards, Igor