qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Peter Xu <peterx@redhat.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v7 4/4] utils: remove assert in size_to_str()
Date: Thu, 11 May 2017 13:26:24 -0500	[thread overview]
Message-ID: <83dec552-7f69-74ef-6756-0ce3180ef225@redhat.com> (raw)
In-Reply-To: <87lgq3ntis.fsf@dusky.pond.sub.org>

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

On 05/11/2017 01:22 PM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
>> On 05/11/2017 07:22 AM, Peter Xu wrote:
>>> It's not very safe to assert in size_to_str(). Let's be inclusive.
>>>
>>> It naturally allows negative values. Now it won't even limit on the
>>> size, as long as double would allow.
>>>
>>> Signed-off-by: Peter Xu <peterx@redhat.com>
>>> ---
>>>  util/cutils.c | 9 +++++++--
>>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>
>> Since you just introduced this in 2/4, I'd rather see the two squashed
>> together if we decide this is the interface we want to support.
> 
> PATCH 2 factors it out of print_type_size().  Doing just that and
> improving only on top makes some sense.

Okay. (Moral of the story: I should have done more than just glance at 2
before commenting on 4)

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


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

      reply	other threads:[~2017-05-11 18:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 12:22 [Qemu-devel] [PATCH v7 0/4] ramblock: add hmp command "info ramblock" Peter Xu
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 1/4] ramblock: add RAMBLOCK_FOREACH() Peter Xu
2017-05-11 13:01   ` Dr. David Alan Gilbert
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 2/4] utils: provide size_to_str() Peter Xu
2017-05-11 13:05   ` Dr. David Alan Gilbert
2017-05-12  4:12     ` Peter Xu
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 3/4] ramblock: add new hmp command "info ramblock" Peter Xu
2017-05-11 12:22 ` [Qemu-devel] [PATCH v7 4/4] utils: remove assert in size_to_str() Peter Xu
2017-05-11 15:03   ` Eric Blake
2017-05-11 18:22     ` Markus Armbruster
2017-05-11 18:26       ` Eric Blake [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=83dec552-7f69-74ef-6756-0ce3180ef225@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.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).