From: Paolo Bonzini <pbonzini@redhat.com>
To: wenchao xia <xiaxia347os@163.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
qemu-devel@nongnu.org, blauwirbel@gmail.com, eblake@redhat.com,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH V5 5/5] libqblock test example
Date: Wed, 03 Oct 2012 14:21:49 +0200 [thread overview]
Message-ID: <506C2DDD.6090500@redhat.com> (raw)
In-Reply-To: <506C2206.7030809@163.com>
Il 03/10/2012 13:31, wenchao xia ha scritto:
>>> +const uint64_t *qb_get_virt_size(const QBlockStaticInfo *info)
>>> +{
>>> + return info->member_addr->virt_size;
>>
>> Please change this to:
>>
>> QBlockStaticInfoAddr addrs;
>> qb_setup_info_addr(info, &addrs);
>> return *addrs->virt_size;
>>
>> and similarly for the others.
>>
>> QBlockStaticInfoAddr should not be a public struct. I'm sorry if this
>> wasn't clear.
>>
>> I'll review the rest on Monday.
>>
>> Paolo
>>
> Hi, QBlockStaticInfoAddr was declared as a pointer, user can't see
> what it really is. It is actually defined in internal header files.
Yes, but even the type should be hidden. It should be purely an
implementation detail, at least for now, to hide the switch in a single
function.
Paolo
next prev parent reply other threads:[~2012-10-03 12:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-29 8:13 [Qemu-devel] [PATCH V5 0/5] libqblock qemu block layer library Wenchao Xia
2012-09-29 8:13 ` [Qemu-devel] [PATCH V5 1/5] libqblock build system Wenchao Xia
2012-09-29 8:13 ` [Qemu-devel] [PATCH V5 2/5] libqblock type defines Wenchao Xia
2012-09-29 8:13 ` [Qemu-devel] [PATCH V5 3/5] libqblock API Wenchao Xia
2012-09-29 8:37 ` Paolo Bonzini
2012-09-29 8:13 ` [Qemu-devel] [PATCH V5 4/5] libqblock test build system Wenchao Xia
2012-09-29 8:13 ` [Qemu-devel] [PATCH V5 5/5] libqblock test example Wenchao Xia
2012-10-03 11:31 ` wenchao xia
2012-10-03 12:21 ` Paolo Bonzini [this message]
2012-10-05 11:20 ` wenchao xia
2012-10-05 11:32 ` Paolo Bonzini
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=506C2DDD.6090500@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=xiawenc@linux.vnet.ibm.com \
--cc=xiaxia347os@163.com \
/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).