From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, ehabkost@redhat.com, afaerber@suse.de
Subject: [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_suffixed_int() to parse tsc_freq property value
Date: Mon, 10 Dec 2012 22:33:07 +0100 [thread overview]
Message-ID: <1355175187-11470-3-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1355175187-11470-1-git-send-email-imammedo@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
v3:
- s/visit_type_unit_suffixed_int/visit_type_suffixed_int/
v2:
- replace visit_type_freq() with visit_type_unit_suffixed_int()
in x86_cpuid_set_tsc_freq()
---
target-i386/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 7be3ad8..18adff4 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1194,8 +1194,9 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor *v, void *opaque,
const int64_t min = 0;
const int64_t max = INT64_MAX;
int64_t value;
+ const int kHz_factor = 1000;
- visit_type_int(v, &value, name, errp);
+ visit_type_suffixed_int(v, &value, name, kHz_factor, errp);
if (error_is_set(errp)) {
return;
}
--
1.7.11.7
next prev parent reply other threads:[~2012-12-10 21:33 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 ` Igor Mammedov [this message]
2012-12-12 18:16 ` [Qemu-devel] [PATCH 2/2] target-i386: use visit_type_suffixed_int() to parse tsc_freq property value 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
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=1355175187-11470-3-git-send-email-imammedo@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).