All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Benoît Canet" <benoit.canet@nodalink.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, armbru@redhat.com, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH v3 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer
Date: Wed, 24 Sep 2014 10:33:23 -0600	[thread overview]
Message-ID: <5422F253.7090403@redhat.com> (raw)
In-Reply-To: <1411572065-18072-2-git-send-email-benoit.canet@nodalink.com>

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

On 09/24/2014 09:21 AM, Benoît Canet wrote:
> We will want to reuse this define in the future by making it common to multiple
> QEMU modules.
> It would be safer that this define be an integer so we avoid strange float
> rounding errors.
> Do this conversion.
> 
> Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
> ---
>  include/qemu/throttle.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
> index b890613..8f9e611 100644
> --- a/include/qemu/throttle.h
> +++ b/include/qemu/throttle.h
> @@ -27,7 +27,7 @@
>  #include "qemu-common.h"
>  #include "qemu/timer.h"
>  
> -#define NANOSECONDS_PER_SECOND  1000000000.0
> +#define NANOSECONDS_PER_SECOND  1000000000
>  
>  typedef enum {
>      THROTTLE_BPS_TOTAL,
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-09-24 16:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 15:21 [Qemu-devel] [PATCH v3 0/3] timed average infrastructure for use in block statistics Benoît Canet
2014-09-24 15:21 ` [Qemu-devel] [PATCH v3 1/3] throttle: Make NANOSECONDS_PER_SECOND an integer Benoît Canet
2014-09-24 16:33   ` Eric Blake [this message]
2014-09-24 15:21 ` [Qemu-devel] [PATCH v3 2/3] timers: Move NANOSECONDS_PER_SECONDS to timer.h for future reuse Benoît Canet
2014-09-24 15:33   ` Paolo Bonzini
2014-09-24 15:33   ` Paolo Bonzini
2014-09-29 16:04     ` Benoît Canet
2014-09-29 21:54       ` Paolo Bonzini
2014-09-29 23:08         ` Benoît Canet
2014-09-24 15:21 ` [Qemu-devel] [PATCH v3 3/3] util: Infrastructure for computing recent averages Benoît Canet
2014-10-13 12:05   ` Paolo Bonzini
2014-10-13 15:06     ` Benoît Canet

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=5422F253.7090403@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benoit.canet@nodalink.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.