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

Re: [Xen-devel] [PATCH v2] x86/hvm: Change return error for offline vcpus



On Fri, 2018-09-21 at 04:34 -0600, Jan Beulich wrote:
> > > > On 21.09.18 at 09:30, <aisaila@xxxxxxxxxxxxxxx> wrote:
> > 
> > --- a/xen/arch/x86/hvm/save.c
> > +++ b/xen/arch/x86/hvm/save.c
> > @@ -165,7 +165,8 @@ int hvm_save_one(struct domain *d, unsigned int
> > typecode, unsigned int instance,
> >      if ( (rv = hvm_sr_handlers[typecode].save(v, &ctxt)) != 0 )
> >          printk(XENLOG_G_ERR "HVM%d save: failed to save type
> > %"PRIu16" (%d)\n",
> >                 d->domain_id, typecode, rv);
> > -    else if ( rv = -ENOENT, ctxt.cur >= sizeof(*desc) )
> > +    else if ( rv = hvm_sr_handlers[typecode].kind ==
> > HVMSR_PER_VCPU ?
> > +              -ENODATA : -ENOENT, ctxt.cur >= sizeof(*desc) )
> 
> This very certainly needs parenthesizes, since if asked explicitly I
> don't think many people will be able to quickly answer the question
> of precedence between the ?: and , operators. I'm happy to add
> these while committing, and with them in place
> Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
Ok, thanks for the help.

Alex

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.