From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEdD1-0005Hg-2W for qemu-devel@nongnu.org; Tue, 05 Aug 2014 07:47:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEdCt-0000Ld-Ej for qemu-devel@nongnu.org; Tue, 05 Aug 2014 07:47:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEdCt-0000LZ-5V for qemu-devel@nongnu.org; Tue, 05 Aug 2014 07:47:07 -0400 Message-ID: <53E0C437.6020607@redhat.com> Date: Tue, 05 Aug 2014 05:47:03 -0600 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="04I3TiAl0dF4SL0I5u8vLNigwMeJCgbfR" Subject: Re: [Qemu-devel] [PATCH v4 1/6] memory: add memory_region_init_ram_may_fail() and memory_region_init_ram_ptr_may_fail() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao , qemu-devel@nongnu.org Cc: Paolo Bonzini , "Michael S. Tsirkin" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --04I3TiAl0dF4SL0I5u8vLNigwMeJCgbfR Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > We will rename _may_fail variants later so that we will have two versio= ns > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --04I3TiAl0dF4SL0I5u8vLNigwMeJCgbfR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT4MQ3AAoJEKeha0olJ0NqzV0IAJw9ermBPfFhm6VhthVSi6PF iaRItnQyg8CyRlFX6DfWiu96foMTz2dwX4lQMMIafAYBuOwRZnmrEITwymndk2EP D+chkGga2Wctg9m5NPIk2q0xXBHDEE8LaA7kHkDaYLin4bucxdMcuQyaD0fGAsyl OFprxFqdaIqleXJ1rOtsHIfnFbEWyfM9VxpFsFfiVfI73lKNa6QmCVkeAi1cvise 08UMTCGCliSQZA1oHCP9faxv5GX2dC8okVdwykJ3QWtvtnikiElhM2o4yZqBHUw0 ainVa3E7uGMspTdUSAKuRABn7qAh7yv+b18y6Xs6jEQyHhCet8NwXJRgljWWdDE= =Zv8D -----END PGP SIGNATURE----- --04I3TiAl0dF4SL0I5u8vLNigwMeJCgbfR--