From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize()
Date: Wed, 23 Dec 2015 21:08:35 +0800 [thread overview]
Message-ID: <567A9CD3.2040501@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1512231135060.26829@kaball.uk.xensource.com>
Hi Stefano,
first of all, thanks for your quick response:)
On 12/23/2015 08:03 PM, Stefano Stabellini wrote:
> On Wed, 23 Dec 2015, Cao jin wrote:
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>>
>> Since the callchain is pretty deep & error path is very much too, so I made the
>> patch based on the principal: catch/report the most necessary error msg with
>> smallest modification.(So you can see I don`t change some functions to void,
>> despite they coule be)
>
> Thanks Cao.
>
> For consistency with the other functions, I think it would be better to
> change all functions to return void or none.
>
Ok, I`ll select one style may with the smallest modification;)
> Also it might be nice to split the patch in a series.
>
Yup, and the patches should be independent from each other?
> The patch as is fails to build:
>
> qemu/hw/xen/xen_pt_config_init.c: In function ‘xen_pt_config_init’:
> qemu/hw/xen/xen_pt_config_init.c:2061:42: error: ‘rc’ may be used uninitialized in this func
>
really weird...last patch you remind me that it cannot compile, make me
find that my computer didn`t install xen-devel package, then I installed
it right away. But this time, it really can compile on my
computer....anyway, I will check it out later.
>
>> hw/xen/xen-host-pci-device.c | 79 +++++++++++++++++++++++++++-----------------
>> hw/xen/xen-host-pci-device.h | 5 +--
>> hw/xen/xen_pt.c | 67 +++++++++++++++++++------------------
>> hw/xen/xen_pt.h | 5 +--
>> hw/xen/xen_pt_config_init.c | 47 +++++++++++++-------------
>> hw/xen/xen_pt_graphics.c | 6 ++--
>> 6 files changed, 118 insertions(+), 91 deletions(-)
>>
>> diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c
>> index 7d8a023..1ab6d97 100644
>> --- a/hw/xen/xen-host-pci-device.c
>> +++ b/hw/xen/xen-host-pci-device.c
>> @@ -43,13 +43,14 @@ static int xen_host_pci_sysfs_path(const XenHostPCIDevice *d,
>> /* The output is truncated, or some other error was encountered */
>> return -ENODEV;
>> }
>> +
>> return 0;
>> }
>
> I would prefer to keep stylistic changes separate, especially the ones
> in functions which would be otherwise left unmodified. Maybe you could
> move them to a separate patch?
>
I can do that.
>
[...]
>> +
>> if (i != PCI_NUM_REGIONS) {
>> /* Invalid format or input to short */
>> - rc = -ENODEV;
>> + error_setg(errp, "Invalid format or input to short");
>
> ^too short
How about printing all the string in buf? like:
"Invalid format or input to short: %s", buf
for all the other comments below: will fix them up:)
>
>> }
>>
>> out:
>> close(fd);
>> - return rc;
>> }
>>
[...]
>
--
Yours Sincerely,
Cao Jin
next prev parent reply other threads:[~2015-12-23 13:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 10:23 [Qemu-devel] [PATCH] Xen PCI passthrough: convert to realize() Cao jin
2015-12-23 12:03 ` Stefano Stabellini
2015-12-23 13:08 ` Cao jin [this message]
2015-12-23 14:03 ` Stefano Stabellini
2015-12-24 2:23 ` Cao jin
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=567A9CD3.2040501@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.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 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.