From: "Jan Beulich" Subject: Re: [PATCH v4 8/8] ioreq-server: bring the PCI hotplug controller implementation into Xen Date: Wed, 09 Apr 2014 14:53:42 +0100 Message-ID: <53456D060200007800007389@nat28.tlf.novell.com> References: <1396451496-5716-1-git-send-email-paul.durrant@citrix.com> <1396451496-5716-9-git-send-email-paul.durrant@citrix.com> <5345686F0200007800007313@nat28.tlf.novell.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02D3DA4@AMSPEX01CL01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02D3DA4@AMSPEX01CL01.citrite.net> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Ian Jackson , Stefano Stabellini , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org >>> On 09.04.14 at 15:42, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >> >>> On 02.04.14 at 17:11, wrote: >> > +int gpe_init(struct domain *d) >> > +{ >> > + struct hvm_hotplug *hp = &d->arch.hvm_domain.hotplug; >> > + >> > + hp->gpe_sts = xzalloc_array(uint8_t, ACPI_GPE0_BLK_LEN_V1 / 2); >> > + if ( hp->gpe_sts == NULL ) >> > + goto fail1; >> > + >> > + hp->gpe_en = xzalloc_array(uint8_t, ACPI_GPE0_BLK_LEN_V1 / 2); >> > + if ( hp->gpe_en == NULL ) >> > + goto fail2; >> >> I'd like to ask (also elsewhere in this series) to try to limit the number >> of "goto"s to the absolute minimum required to help code readability. > > Personally I find using forward jumps to fail labels the most readable form > of error exit - I wish they were used more widely. Interesting - almost everyone/-thing involved in educating me in programming skills recommended to try to get away without goto altogether, unless programming Fortran, Basic or some such. Jan