qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 1/3] pflash_cfi01: add pflash_cfi01_init


From: Max Filippov
Subject: Re: [Qemu-devel] [PATCH 1/3] pflash_cfi01: add pflash_cfi01_init
Date: Sun, 27 Sep 2015 20:51:40 +0300

On Sun, Sep 27, 2015 at 8:25 PM, Peter Crosthwaite
<address@hidden> wrote:
> On Sun, Sep 27, 2015 at 10:16 AM, Max Filippov <address@hidden> wrote:
>> pflash_cfi01_register always registers FLASH to the default
>> system_memory region, which may not always be the right thing.
>>
>> Provide pflash_cfi01_init function that only creates FLASH device and
>> sets its properties, leaving MMIO region registration to its caller.
>>
>
> You should just use QOM to create your device inline without need for
> a construction helper. See Vexpress's ve_pflash_cfi01_register for an
> example.

I thought about it and it looks like a lot of boilerplate code for nothing.
Maybe it'd be better to remove qdev_init_nofail call from that init function
and let ve_pflash_cfi01_register reuse it too?

-- 
Thanks.
-- Max



reply via email to

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