From: Ian Jackson Subject: Re: [PATCH v3 6/8] tools: arm: refactor code to setup guest p2m and fill it with RAM Date: Fri, 2 May 2014 15:42:19 +0100 Message-ID: <21347.44747.817900.560825@mariner.uk.xensource.com> References: <1398690109.29700.82.camel@kazak.uk.xensource.com> <1398690132-5651-6-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1398690132-5651-6-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("[PATCH v3 6/8] tools: arm: refactor code to setup guest p2m and fill it with RAM"): ... > +static int populate_guest_memory(struct xc_dom_image *dom, > + xen_pfn_t base_pfn, xen_pfn_t nr_pfns) > +{ > + int rc; > + xen_pfn_t allocsz, pfn; > + > + if (!nr_pfns) > + return 0; Why bother with this early return ? Ian.