From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNTmZ-0001AZ-9u for qemu-devel@nongnu.org; Fri, 20 May 2011 13:46:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNTmY-0003ro-Ce for qemu-devel@nongnu.org; Fri, 20 May 2011 13:46:39 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:60243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNTmY-0003rV-7c for qemu-devel@nongnu.org; Fri, 20 May 2011 13:46:38 -0400 Received: by wyb42 with SMTP id 42so3314933wyb.4 for ; Fri, 20 May 2011 10:46:37 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4DD6A8FB.8030600@redhat.com> Date: Fri, 20 May 2011 19:46:35 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1305630067-2119-1-git-send-email-pbonzini@redhat.com> <1305630067-2119-5-git-send-email-pbonzini@redhat.com> <20110520155350.GD4466@lst.de> In-Reply-To: <20110520155350.GD4466@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 04/21] scsi: introduce SCSIBusOps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org On 05/20/2011 05:53 PM, Christoph Hellwig wrote: >> qbus_create_inplace(&bus->qbus,&scsi_bus_info, host, NULL); >> > bus->busnr = next_scsi_bus++; >> > bus->tcq = tcq; >> > bus->ndev = ndev; >> > - bus->complete = complete; >> > + bus->ops = *ops; > > Normally bus->ops would be a pointer, so you can just assign it to > the address passed in instead of doing a copy. Any good reason to > do it differently here? I was thinking that they could be modified in-place later, or built on the stack depending on some qdev properties, but it's probably pointless to do it differently. Will change. Paolo