From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhjs4-00057v-5b for qemu-devel@nongnu.org; Wed, 29 May 2013 13:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uhjrx-0004JL-Ai for qemu-devel@nongnu.org; Wed, 29 May 2013 13:09:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uhjrx-0004JH-0d for qemu-devel@nongnu.org; Wed, 29 May 2013 13:09:01 -0400 Message-ID: <51A6361D.50706@redhat.com> Date: Wed, 29 May 2013 19:08:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20130529170459.GK23342@smtp.vpn> In-Reply-To: <20130529170459.GK23342@smtp.vpn> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 4/5] xilinx_devcfg: Zynq devcfg device model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: blauwirbel@gmail.com, peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, qemu-devel@nongnu.org, kraxel@redhat.com Il 29/05/2013 19:04, Edgar E. Iglesias ha scritto: >> > + for (i = 0; i < R_MAX; ++i) { >> > + RegisterInfo *r = &s->regs_info[i]; >> > + >> > + *r = (RegisterInfo) { >> > + .data = &s->regs[i], >> > + .data_size = sizeof(uint32_t), >> > + .access = &xilinx_devcfg_regs_info[i], >> > + .debug = XILINX_DEVCFG_ERR_DEBUG, >> > + .prefix = prefix, >> > + .opaque = s, >> > + }; >> > + memory_region_init_io(&r->mem, &devcfg_reg_ops, r, "devcfg-regs", 4); > Hi Peter, Should we be putting r->access->name here instead of "devcfg-regs"? Yes, that's why I preferred to wrap the memory_region_init_io into an API that takes a RegisterInfo. :) Paolo