From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 19/19] libxl: build a device tree for ARM guests Date: Thu, 14 Nov 2013 12:17:00 +0000 Message-ID: <5284BF3C.9010307@linaro.org> References: <1384366234.29080.8.camel@kazak.uk.xensource.com> <1384366285-29277-19-git-send-email-ian.campbell@citrix.com> <5284219D.3060503@linaro.org> <1384417691.7059.25.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1384417691.7059.25.camel@dagon.hellion.org.uk> 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: Ian Jackson , stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 11/14/2013 08:28 AM, Ian Campbell wrote: > On Thu, 2013-11-14 at 01:04 +0000, Julien Grall wrote: >> Why didn't you try to use fdt_open_into? It should fit our usage: ie, >> grow up the size of the device tree. Actually, DTC uses this solution >> when the fdt needs to be resized. > > It seemed to be far more complex -- you would need to wrap every > potentially failing fdt operation in a while loop which does the realloc > and open into on ENOSPACE. Now that could be done by a macro but it > would need to have much wider scope than here since it would be needed > all the way down the call chain. > > This way the functions building each node don't need to worry about all > that and only the toplevel needs to care. I'd be in favour of increasing > the default allocation size before I wanted to switch the mechanism like > this. Ok. Then: Acked-by: Julien Grall -- Julien Grall