qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_r


From: Peter Maydell
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/3] hw: do not pass NULL to memory_region_init from instance_init
Date: Thu, 1 Oct 2015 10:27:40 +0100

On 1 October 2015 at 09:26, Markus Armbruster <address@hidden> wrote:
> Markus Armbruster <address@hidden> writes:
>
>> Paolo Bonzini <address@hidden> 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).

That's the result of the code motion in commit 01b91ac2be83
which moved these lines from realize to initfn without noticing
that the OBJECT(s) could be simplified to obj in the process.

thanks
-- PMM



reply via email to

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