[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 06/12] register: Add block initialise helper
From: |
Alistair Francis |
Subject: |
Re: [Qemu-devel] [PATCH v7 06/12] register: Add block initialise helper |
Date: |
Thu, 23 Jun 2016 11:10:37 -0700 |
On Thu, Jun 23, 2016 at 11:02 AM, Peter Maydell
<address@hidden> wrote:
> On 23 June 2016 at 18:29, Alistair Francis <address@hidden> wrote:
>> On Thu, Jun 23, 2016 at 5:55 AM, Peter Maydell <address@hidden> wrote:
>>> It's not clear to me which of these are input arguments to the
>>> function, and which are things that the function initializes
>>> (I think 'ri' is purely output?)
>>
>> The function expects everything to already be initialised, it just
>> wires them up.
>>
>> ri should already be allocated, this function just sets up some pointers to
>> it.
>>
>> I added a comment in the description saying that ri and data must
>> already be allocated. Is that enough?
>
> Does the caller have to initialize the array that ri points to
> before it calls this?
All the caller has to do is ensure that the array exists and is large
enough for the number of registers.
Thanks,
Alistair
>
> thanks
> -- PMM
>
- Re: [Qemu-devel] [PATCH v7 03/12] register: Add Memory API glue, (continued)
[Qemu-devel] [PATCH v7 04/12] register: Define REG and FIELD macros, Alistair Francis, 2016/06/22
[Qemu-devel] [PATCH v7 02/12] register: Add Register API, Alistair Francis, 2016/06/22
[Qemu-devel] [PATCH v7 09/12] irq: Add opaque setter routine, Alistair Francis, 2016/06/22
[Qemu-devel] [PATCH v7 07/12] dma: Add Xilinx Zynq devcfg device model, Alistair Francis, 2016/06/22
[Qemu-devel] [PATCH v7 08/12] xilinx_zynq: Connect devcfg to the Zynq machine model, Alistair Francis, 2016/06/22