From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG95t-0001Es-Gx for qemu-devel@nongnu.org; Thu, 23 Jun 2016 14:11:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bG95n-0002Od-Cl for qemu-devel@nongnu.org; Thu, 23 Jun 2016 14:11:12 -0400 Received: from mail-oi0-x242.google.com ([2607:f8b0:4003:c06::242]:33989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bG95n-0002OP-88 for qemu-devel@nongnu.org; Thu, 23 Jun 2016 14:11:07 -0400 Received: by mail-oi0-x242.google.com with SMTP id s17so13679783oih.1 for ; Thu, 23 Jun 2016 11:11:07 -0700 (PDT) MIME-Version: 1.0 Sender: alistair23@gmail.com In-Reply-To: References: <6ae9a75f0189ac76f8fc0b74ec85eb45b443d9af.1466626975.git.alistair.francis@xilinx.com> From: Alistair Francis Date: Thu, 23 Jun 2016 11:10:37 -0700 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v7 06/12] register: Add block initialise helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Alistair Francis , Edgar Iglesias , QEMU Developers , Peter Crosthwaite , "Edgar E. Iglesias" , =?UTF-8?B?QWxleCBCZW5uw6ll?= , =?UTF-8?Q?Andreas_F=C3=A4rber?= , =?UTF-8?B?S09OUkFEIEZyw6lkw6lyaWM=?= On Thu, Jun 23, 2016 at 11:02 AM, Peter Maydell wrote: > On 23 June 2016 at 18:29, Alistair Francis wrote: >> On Thu, Jun 23, 2016 at 5:55 AM, Peter Maydell 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 >