All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mao Zhongyi <maozy.fnst@cn.fujitsu.com>
To: Markus Armbruster <armbru@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>
Cc: marcel@redhat.com, mst@redhat.com, qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <86e97bfd-79c9-3fbd-55b6-431f9d889327@cn.fujitsu.com> (raw)
In-Reply-To: <87y3tgayod.fsf@dusky.pond.sub.org>

Hi, Markus

On 05/29/2017 03:51 PM, Markus Armbruster wrote:
> Igor Mammedov <imammedo@redhat.com> writes:
>
>> On Fri, 26 May 2017 16:29:25 +0800
>> Mao Zhongyi <maozy.fnst@cn.fujitsu.com> 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 <maozy.fnst@cn.fujitsu.com>
>>> ---
[...]

>>
>> 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	other threads:[~2017-05-31  1:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-26  8:29 [Qemu-devel] [PATCH] pci: Set err to errp directly rather than through error_porpagate() Mao Zhongyi
2017-05-26  9:43 ` Igor Mammedov
2017-05-26 11:08   ` Mao Zhongyi
2017-05-29  7:51   ` Markus Armbruster
2017-05-31  1:38     ` Mao Zhongyi [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=86e97bfd-79c9-3fbd-55b6-431f9d889327@cn.fujitsu.com \
    --to=maozy.fnst@cn.fujitsu.com \
    --cc=armbru@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@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 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.