qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] pci: Set err to errp directly rather than throu


From: Mao Zhongyi
Subject: Re: [Qemu-devel] [PATCH] pci: Set err to errp directly rather than through error_porpagate()
Date: Wed, 31 May 2017 09:38:21 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

Hi, Markus

On 05/29/2017 03:51 PM, Markus Armbruster wrote:
Igor Mammedov <address@hidden> writes:

On Fri, 26 May 2017 16:29:25 +0800
Mao Zhongyi <address@hidden> wrote:

ioh3420_interrupts_init() and its callers, rp_realize() and
pci_qdev_realize() fill error message to local_err, then
propagate it to errp by error_porpagate(), which's not necessary.
So eliminate it and pass errp directly instead of local_err.
Of course, error_propagate() also will be removed.

Signed-off-by: Mao Zhongyi <address@hidden>
---
[...]


dropping local_error here looks wrong since it's used
to check error status inside these functions and to undo
side effects in case of failure.

consider if caller pass errp = NULL
then error handling path won't be executed.

Exactly.  The big comment in include/qapi/error.h explains this and
more.

Thanks for providing the specific path, I have seen detailed comments
that have really helped me.

Thanks,
Mao


So keep the rest of the patch but drop above hunks.








reply via email to

[Prev in Thread] Current Thread [Next in Thread]