From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhYTE-0007Qs-KI for qemu-devel@nongnu.org; Thu, 01 Oct 2015 03:40:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhYT9-0003I2-KQ for qemu-devel@nongnu.org; Thu, 01 Oct 2015 03:40:04 -0400 From: Markus Armbruster References: <1443530263-32340-1-git-send-email-pbonzini@redhat.com> <1443530263-32340-3-git-send-email-pbonzini@redhat.com> <560B9DB4.8080707@redhat.com> <560BDDCC.9070307@redhat.com> Date: Thu, 01 Oct 2015 09:39:56 +0200 In-Reply-To: <560BDDCC.9070307@redhat.com> (Paolo Bonzini's message of "Wed, 30 Sep 2015 15:04:12 +0200") Message-ID: <87eghfdokz.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, Thomas Huth , mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, agraf@suse.de, blauwirbel@gmail.com, qemu-ppc@nongnu.org Paolo Bonzini writes: > On 30/09/2015 10:30, Thomas Huth wrote: >>> > @@ -944,7 +944,7 @@ static void tcx_initfn(Object *obj) >>> > SysBusDevice *sbd = SYS_BUS_DEVICE(obj); >>> > TCXState *s = TCX(obj); >>> > >>> > - memory_region_init_ram(&s->rom, NULL, "tcx.prom", FCODE_MAX_ROM_SIZE, >>> > + memory_region_init_ram(&s->rom, OBJECT(s), "tcx.prom", FCODE_MAX_ROM_SIZE, >>> > &error_fatal); >> Why "OBJECT(s)" and not simply "obj" ? > > No particular reason, just the way my brain worked. :) I can touch it up on commit.