From patchwork Wed Apr 26 12:53:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zihan Yang X-Patchwork-Id: 9701337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D650860245 for ; Wed, 26 Apr 2017 12:57:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C863A2015F for ; Wed, 26 Apr 2017 12:57:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD46F20223; Wed, 26 Apr 2017 12:57:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 721052015F for ; Wed, 26 Apr 2017 12:57:03 +0000 (UTC) Received: from localhost ([::1]:55087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3MVC-0008Cy-NG for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Apr 2017 08:57:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3MRs-00065p-Tl for qemu-devel@nongnu.org; Wed, 26 Apr 2017 08:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3MRs-0005SD-13 for qemu-devel@nongnu.org; Wed, 26 Apr 2017 08:53:36 -0400 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:34967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3MRr-0005Rw-Rp for qemu-devel@nongnu.org; Wed, 26 Apr 2017 08:53:35 -0400 Received: by mail-pg0-x242.google.com with SMTP id 72so2624044pge.2 for ; Wed, 26 Apr 2017 05:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WbF/4tlYMlKmEYWztHCqKCunBBOcaIfRfP9kqlUNDyg=; b=L9ildnN5KLABv9fjmHRnIo1TrDERDVShbRyOI2bP+4cIz9CdrV2AIioJ/wl9UpAoyI R7ouOvKRnqy4LAKE7KJNuMKnD6J8XHg+5FcXkklwzTZwDVbdflgBAXs8mHTvXcQQ0tfn 2EjvEjvJZXmx6+uOXB4Xp1VlnPOyRjNWdq02TsWFpqRsmJp5QgaSTJ11nSDyXA/vBST+ 22pN2zmXztWzjgAvN4w5joCpV3e85o8vkthzCxwN4vXVEsiMyOrvj3rLyhJR8IjLd1Ln 9ommeyBWY9XI8ApvbX/6xk+opc4hBgvWHCMO3fTYXfS/6POIOmmJ3IeWTIjMRevkC0DN UtYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WbF/4tlYMlKmEYWztHCqKCunBBOcaIfRfP9kqlUNDyg=; b=lZFVoTm2BWd4CJpxi5htO9u1kh5o5FxreVFLO2ZKECTyDjN0WBCAP7nqMq0bdZmsgd IUO3TAYVtqFf2cVJyDG5d8t5EHVIZ9/wEvKykHRXTjYs69P9MiuIGSGnx2FnnyOtN+31 TQRdlNpBjQdBQWL3w5P8e6cCqW90MH/eFy1b6CmmlFpz2pCZ9aIgCwm4ANXvMTTAF0w+ e5O6G1Tdc1HtxWLSArmEu5kQbdvrmTx6siGPhcpOb5dDJVMd2wVnwQT2n6zo1k1eiF3j wL4hJWFZqkNmFMW+GEDhgYR/zFrO+XYz3U4PUmYLXb4X6H2Ws/0uNbj8eSdPYXZc0kMI 3pvg== X-Gm-Message-State: AN3rC/6BDg4U7KQ3xM0P2xIanuLjMp/RL2m4y35oFJPdwgWLQPgDfD+g UJ6SXGhiJ/RPkA== X-Received: by 10.98.18.137 with SMTP id 9mr33376180pfs.75.1493211214875; Wed, 26 Apr 2017 05:53:34 -0700 (PDT) Received: from fma-dfsg.ipads-lab.se.sjtu.edu.cn ([69.85.85.101]) by smtp.gmail.com with ESMTPSA id 3sm369324pge.12.2017.04.26.05.53.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Apr 2017 05:53:34 -0700 (PDT) From: Zihan Yang To: qemu-devel@nongnu.org Date: Wed, 26 Apr 2017 20:53:05 +0800 Message-Id: <1493211188-24086-2-git-send-email-tgnyang@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493211188-24086-1-git-send-email-tgnyang@gmail.com> References: <1493211188-24086-1-git-send-email-tgnyang@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::242 Subject: [Qemu-devel] [PATCH 2/5] hw/s390x: make virtio_ccw_exit function in virtio-ccw return void 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: "Michael S. Tsirkin" , Alexander Graf , Christian Borntraeger , Cornelia Huck , Zihan Yang , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Only virtio_ccw_exit and the callback in VirtIOCCWDeviceClass are converted to void in this patch. 'virtio_ccw_busdev_exit' belongs to DeviceClass so it still returns int at present, DeviceClass::exit will return void in another patch. Signed-off-by: Zihan Yang --- hw/s390x/virtio-ccw.c | 6 +++--- hw/s390x/virtio-ccw.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index e7167e3..91b43ac 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -731,7 +731,7 @@ out_err: g_free(sch); } -static int virtio_ccw_exit(VirtioCcwDevice *dev) +static void virtio_ccw_exit(VirtioCcwDevice *dev) { CcwDevice *ccw_dev = CCW_DEVICE(dev); SubchDev *sch = ccw_dev->sch; @@ -744,7 +744,6 @@ static int virtio_ccw_exit(VirtioCcwDevice *dev) release_indicator(&dev->routes.adapter, dev->indicators); dev->indicators = NULL; } - return 0; } static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp) @@ -1627,7 +1626,8 @@ static int virtio_ccw_busdev_exit(DeviceState *dev) VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev; VirtIOCCWDeviceClass *_info = VIRTIO_CCW_DEVICE_GET_CLASS(dev); - return _info->exit(_dev); + _info->exit(_dev); + return 0; } static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev, diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 41d4010..ce8baa3 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -74,7 +74,7 @@ typedef struct VirtioCcwDevice VirtioCcwDevice; typedef struct VirtIOCCWDeviceClass { CCWDeviceClass parent_class; void (*realize)(VirtioCcwDevice *dev, Error **errp); - int (*exit)(VirtioCcwDevice *dev); + void (*exit)(VirtioCcwDevice *dev); } VirtIOCCWDeviceClass; /* Performance improves when virtqueue kick processing is decoupled from the