qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/6] spapr: sanitize error handling in spapr_ics


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 4/6] spapr: sanitize error handling in spapr_ics_create()
Date: Tue, 16 May 2017 14:39:10 +1000
User-agent: Mutt/1.8.0 (2017-02-23)

On Mon, May 15, 2017 at 02:06:18PM +0200, Greg Kurz wrote:
> On Mon, 15 May 2017 13:59:33 +0200
> Cédric Le Goater <address@hidden> wrote:
> 
> > On 05/15/2017 01:39 PM, Greg Kurz wrote:
> > > The spapr_ics_create() function handles errors in a rather convoluted
> > > way, with two local Error * variables. Moreover, failing to parent the
> > > ICS object to the machine should be considered as a bug but it is
> > > currently ignored.  
> > 
> > I am not sure what should be done for object_property_add_child()
> > errors but QEMU generally uses NULL for 'Error **'. It might be 
> > wrong though.
> > 
> > As for the local error handling, it is following what is described in 
> > qapi/error.h. Isn't it ?
> > 
> 
> Yes, it does follow the "Receive and accumulate multiple errors" 
> recommandation,
> but does it make sense to realize the ICS object if we failed to set
> nr-irqs ?

Nor is it necessary to have two different local error variables.

-- 
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]