From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNTkS-0008OK-Fs for qemu-devel@nongnu.org; Fri, 20 May 2011 13:44:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNTkR-0003YC-Hl for qemu-devel@nongnu.org; Fri, 20 May 2011 13:44:28 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:62346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNTkR-0003Y8-Ax for qemu-devel@nongnu.org; Fri, 20 May 2011 13:44:27 -0400 Received: by wwj40 with SMTP id 40so3886066wwj.10 for ; Fri, 20 May 2011 10:44:26 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4DD6A878.2050805@redhat.com> Date: Fri, 20 May 2011 19:44:24 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1305630067-2119-1-git-send-email-pbonzini@redhat.com> <1305630067-2119-22-git-send-email-pbonzini@redhat.com> <20110520161132.GU4466@lst.de> In-Reply-To: <20110520161132.GU4466@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 21/21] scsi: split command_complete callback in two List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org On 05/20/2011 06:11 PM, Christoph Hellwig wrote: >> +static void esp_command_complete(SCSIRequest *req, uint32_t arg) > > Shouldn't the "arg" argument to the new ->command_complete be renamed > to something like "sense" or "status"? > >> +static void esp_transfer_data(SCSIRequest *req, uint32_t arg) >> +{ >> + ESPState *s = DO_UPCAST(ESPState, busdev.qdev, req->bus->qbus.parent); >> + >> + DPRINTF("transfer %d/%d\n", s->dma_left, s->ti_size); >> + s->async_len = arg; >> + s->async_buf = scsi_req_get_buf(req); >> + if (s->dma_left) { >> + esp_do_dma(s); >> + } else if (s->dma_counter != 0&& s->ti_size<= 0) { >> + /* If this was the last part of a DMA transfer then the >> + completion interrupt is deferred to here. */ > > And for transfer_data "arg" should become "len". True, I wanted to keep the patch as mechanical as possible. I'll add a 22nd patch doing it. Paolo