All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, ehabkost@redhat.com
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	[thread overview]
Message-ID: <20121210214712.58f53e14@thinkpad.mammed.net> (raw)
In-Reply-To: <50C23CB9.2020508@suse.de>

On Fri, 07 Dec 2012 20:00:09 +0100
Andreas Färber <afaerber@suse.de> wrote:

> Am 06.12.2012 22:12, schrieb Igor Mammedov:
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >   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

      parent reply	other threads:[~2012-12-10 20:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 21:12 [Qemu-devel] [PATCH 0/2] introduce visitor for parsing suffixed integer Igor Mammedov
2012-12-06 21:12 ` [Qemu-devel] [PATCH 1/2] qapi: add visitor for parsing int[KMGT] input string Igor Mammedov
2012-12-06 22:24   ` mdroth
2012-12-07 11:55   ` Eduardo Habkost
2012-12-07 18:57   ` Andreas Färber
2012-12-07 19:53     ` Eduardo Habkost
2012-12-10 16:01     ` Igor Mammedov
2012-12-10 17:27       ` mdroth
2012-12-10 19:03         ` Igor Mammedov
2012-12-06 21:12 ` [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_unit_suffixed_int() to parse tsc_freq property value Igor Mammedov
2012-12-06 22:24   ` mdroth
2012-12-07 11:57   ` Eduardo Habkost
2012-12-07 19:00   ` Andreas Färber
2012-12-07 20:09     ` Eduardo Habkost
2012-12-10 16:13       ` Igor Mammedov
2012-12-10 17:21         ` mdroth
2012-12-10 20:47     ` Igor Mammedov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121210214712.58f53e14@thinkpad.mammed.net \
    --to=imammedo@redhat.com \
    --cc=afaerber@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.