From patchwork Mon Apr 24 07:26:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 754131 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wBJ9x4mytz9s9N for ; Mon, 24 Apr 2017 17:38:45 +1000 (AEST) Received: from localhost ([::1]:42450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2Ya3-0004Ff-5z for incoming@patchwork.ozlabs.org; Mon, 24 Apr 2017 03:38:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2YOs-0003zb-24 for qemu-devel@nongnu.org; Mon, 24 Apr 2017 03:27:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2YOq-0006xm-K1 for qemu-devel@nongnu.org; Mon, 24 Apr 2017 03:27:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49696) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2YOq-0006xL-Ai for qemu-devel@nongnu.org; Mon, 24 Apr 2017 03:27:08 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51398C04B94B for ; Mon, 24 Apr 2017 07:27:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 51398C04B94B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=armbru@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 51398C04B94B Received: from blackfin.pond.sub.org (ovpn-116-149.ams2.redhat.com [10.36.116.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8372E18153; Mon, 24 Apr 2017 07:27:05 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A021E11386D0; Mon, 24 Apr 2017 09:27:00 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 24 Apr 2017 09:26:57 +0200 Message-Id: <1493018820-23445-13-git-send-email-armbru@redhat.com> In-Reply-To: <1493018820-23445-1-git-send-email-armbru@redhat.com> References: <1493018820-23445-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 24 Apr 2017 07:27:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 12/15] scsi: Make errp the last parameter of virtio_scsi_common_realize X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Fam Zheng Signed-off-by: Fam Zheng Message-Id: <20170421122710.15373-12-famz@redhat.com> Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- hw/scsi/vhost-scsi.c | 6 ++++-- hw/scsi/virtio-scsi.c | 11 +++++++---- include/hw/virtio/virtio-scsi.h | 8 +++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index c491ece..f53bc17 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -233,9 +233,11 @@ static void vhost_scsi_realize(DeviceState *dev, Error **errp) } } - virtio_scsi_common_realize(dev, &err, vhost_dummy_handle_output, + virtio_scsi_common_realize(dev, vhost_dummy_handle_output, - vhost_dummy_handle_output); + vhost_dummy_handle_output, + vhost_dummy_handle_output, + &err); if (err != NULL) { error_propagate(errp, err); goto close_fd; diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index bd62d08..46a3e3f 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -841,10 +841,11 @@ static struct SCSIBusInfo virtio_scsi_scsi_info = { .load_request = virtio_scsi_load_request, }; -void virtio_scsi_common_realize(DeviceState *dev, Error **errp, +void virtio_scsi_common_realize(DeviceState *dev, VirtIOHandleOutput ctrl, VirtIOHandleOutput evt, - VirtIOHandleOutput cmd) + VirtIOHandleOutput cmd, + Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); VirtIOSCSICommon *s = VIRTIO_SCSI_COMMON(dev); @@ -878,9 +879,11 @@ static void virtio_scsi_device_realize(DeviceState *dev, Error **errp) VirtIOSCSI *s = VIRTIO_SCSI(dev); Error *err = NULL; - virtio_scsi_common_realize(dev, &err, virtio_scsi_handle_ctrl, + virtio_scsi_common_realize(dev, + virtio_scsi_handle_ctrl, virtio_scsi_handle_event, - virtio_scsi_handle_cmd); + virtio_scsi_handle_cmd, + &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h index 8ae0aca..8c8453c 100644 --- a/include/hw/virtio/virtio-scsi.h +++ b/include/hw/virtio/virtio-scsi.h @@ -135,9 +135,11 @@ static inline void virtio_scsi_release(VirtIOSCSI *s) } } -void virtio_scsi_common_realize(DeviceState *dev, Error **errp, - VirtIOHandleOutput ctrl, VirtIOHandleOutput evt, - VirtIOHandleOutput cmd); +void virtio_scsi_common_realize(DeviceState *dev, + VirtIOHandleOutput ctrl, + VirtIOHandleOutput evt, + VirtIOHandleOutput cmd, + Error **errp); void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp); bool virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq);