qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_unit_suffixed_i


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_unit_suffixed_int() to parse tsc_freq property value
Date: Mon, 10 Dec 2012 21:47:12 +0100

On Fri, 07 Dec 2012 20:00:09 +0100
Andreas Färber <address@hidden> wrote:

> Am 06.12.2012 22:12, schrieb Igor Mammedov:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> >   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(-)
> > 
> > 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, 
> > Visitor *v, void *opaque,
> >      const int64_t max = INT64_MAX;
> >      int64_t value;
> >  
> > -    visit_type_int(v, &value, name, errp);
> > +    visit_type_unit_suffixed_int(v, &value, name, 1000, errp);
> >      if (error_is_set(errp)) {
> >          return;
> >      }
> 
> 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 properties
series we could introduce it and simplify target-i386/cpu.c code a bit.

> 
> Andreas
> 
> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
> 


-- 
Regards,
  Igor



reply via email to

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