qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_f


From: Hu Tao
Subject: Re: [Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_fail() and memory_region_init_ram_ptr_may_fail()
Date: Wed, 6 Aug 2014 09:26:51 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Aug 05, 2014 at 05:47:03AM -0600, Eric Blake wrote:
> On 08/04/2014 11:56 PM, Hu Tao wrote:
> > These two are almost the same as memory_region_init_ram() and
> > memory_region_init_ram_ptr() except that they have an extra errp
> > parameter to let callers handle error. The purpose is to fix the bug
> > described below.
> > 
> > We should have added errp directly to memory_region_ram(), but that
> > mixes updates to calls to memory_region_ram() and this bug fix and make
> > it hard to review.
> > 
> > We will rename _may_fail variants later so that we will have two versions
> > of API: one with errp parameter(memory_region_init_ram(),
> > memory_region_init_ram_ptr()), one without errp parameter and with
> > suffix _nofail.
> 
> That feels like overkill.  Every caller that calls the _nofail variant
> can instead call memory_region_init_ram(..., &error_abort), and then you
> don't need the _nofail version.

Right. v5 is coming soon.

Regards,
Hu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]