From: Igor Mammedov <imammedo@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: afaerber@suse.de, qemu-devel@nongnu.org, ehabkost@redhat.com,
mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 0/2 v2] introduce visitor for parsing suffixed integer
Date: Mon, 24 Dec 2012 15:03:43 +0100 [thread overview]
Message-ID: <20121224150343.13289002@thinkpad.mammed.net> (raw)
In-Reply-To: <87mwx4tsmq.fsf@codemonkey.ws>
On Sun, 23 Dec 2012 14:34:21 -0600
Anthony Liguori <anthony@codemonkey.ws> wrote:
> Igor Mammedov <imammedo@redhat.com> writes:
>
> > v2:
> > * Naming changes:
> > - s/visit_type_uint_suffixed_int/visit_type_suffixed_int/
> > - use 'suffix_factor' instead of 'unit'
> > * Added documentation to visit_type_suffixed_int()
> > * Fixed errp check.
> > * Style fixes
>
> This is not how visitors are supposed to be used.
We were trying to generalize and make code more reusable.
Later could be used as a common base for specialized size and Hz visitors.
> Just treat tsc_freq as a string property and parse it in the setter.
Would http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg03835.html
be better or you suggest just abandon generalization idea and parse it
locally in target-i386/cpu.c?
>
> Regards,
>
> Anthony Liguori
>
> >
> > Reference to previous version dicussion:
> > http://lists.gnu.org/archive/html/qemu-devel/2012-12/msg00758.html
> >
> > Git tree for testing:
> > https://github.com/imammedo/qemu/tree/type_suffixed_int_v2
> >
> > Igor Mammedov (2):
> > add visitor for parsing int[KMGT] input string
> > target-i386: use visit_type_suffixed_int() to parse tsc_freq property
> > value
> >
> > qapi/qapi-dealloc-visitor.c | 8 ++++++++
> > qapi/qapi-visit-core.c | 35 +++++++++++++++++++++++++++++++++++
> > qapi/qapi-visit-core.h | 4 ++++
> > qapi/string-input-visitor.c | 25 +++++++++++++++++++++++++
> > target-i386/cpu.c | 3 ++-
> > 5 files changed, 74 insertions(+), 1 deletion(-)
> >
> > --
> > 1.7.11.7
--
Regards,
Igor
next prev parent reply other threads:[~2012-12-24 14:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 21:33 [Qemu-devel] [PATCH 0/2 v2] introduce visitor for parsing suffixed integer Igor Mammedov
2012-12-10 21:33 ` [Qemu-devel] [PATCH 1/2] add visitor for parsing int[KMGT] input string Igor Mammedov
2012-12-12 18:16 ` Eduardo Habkost
2012-12-14 13:20 ` Igor Mammedov
2012-12-14 18:18 ` Eduardo Habkost
2012-12-10 21:33 ` [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_suffixed_int() to parse tsc_freq property value Igor Mammedov
2012-12-12 18:16 ` Eduardo Habkost
2012-12-23 20:34 ` [Qemu-devel] [PATCH 0/2 v2] introduce visitor for parsing suffixed integer Anthony Liguori
2012-12-24 14:03 ` Igor Mammedov [this message]
2012-12-26 12:51 ` Eduardo Habkost
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=20121224150343.13289002@thinkpad.mammed.net \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--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.