Received: from eggs.gnu.org ([2001:4830:134:3::10]:48936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhZBv-00044k-60 for qemu-devel@nongnu.org; Thu, 01 Oct 2015 04:26:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhZBp-0003sC-2O for qemu-devel@nongnu.org; Thu, 01 Oct 2015 04:26:15 -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> <87eghfdokz.fsf@blackfin.pond.sub.org> Date: Thu, 01 Oct 2015 10:26:04 +0200 In-Reply-To: <87eghfdokz.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Thu, 01 Oct 2015 09:39:56 +0200") Message-ID: <87y4fn3sgz.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 Markus Armbruster writes: > 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. I won't, because the rest of the function uses OBJECT(s).