On Thu, Jun 23, 2016 at 11:02 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 23 June 2016 at 18:29, Alistair Francis <alistair.fran...@xilinx.com> > wrote: >> On Thu, Jun 23, 2016 at 5:55 AM, Peter Maydell <peter.mayd...@linaro.org> >> 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 >