qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH 2/5] spapr: Refactor spapr_drc_detach()


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH 2/5] spapr: Refactor spapr_drc_detach()
Date: Wed, 5 Jul 2017 00:54:54 +1000
User-agent: Mutt/1.8.0 (2017-02-23)

On Thu, Jun 22, 2017 at 11:32:15AM +0200, Greg Kurz wrote:
> On Wed, 21 Jun 2017 17:18:45 +0800
> David Gibson <address@hidden> wrote:
> 
> > This function has two unused parameters - remove them.
> > 
> 
> It's ok for the d argument but I'm not sure about errp... Indeed it isn't used
> in the current code, but looking at the paths below spapr_drc_detach(), we
> have:
> 
> spapr_drc_detach()
>  spapr_drc_release()
>   spapr_core_release()
>    hotplug_handler_unplug(hotplug_ctrl, dev, &error_abort);
> 
> and
> 
> spapr_drc_detach()
>  spapr_drc_release()
>   spapr_lmb_release()
>    hotplug_handler_unplug(hotplug_ctrl, dev, &error_abort);
> 
> Shouldn't we pass the errp down to hotplug_handler_unplug() instead of
> aborting ?

So, at first I thought you were right, and was going to rewrite on
that basis.

Then I realized that calling hotplug_handler_unplug() is a bizarrely
roundabout way of doing what we need anyway (usually the unplug
handler is never called if there is an unplug_request() handler).
Once we expand those out to what they actually call, the errors
disappear again.  I'll do that in the next spin.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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