From patchwork Fri Apr 28 12:55:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zihan Yang X-Patchwork-Id: 9704607 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 D871B60225 for ; Fri, 28 Apr 2017 13:02:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA586208C2 for ; Fri, 28 Apr 2017 13:02:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD59827F93; Fri, 28 Apr 2017 13:02:17 +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 65753208C2 for ; Fri, 28 Apr 2017 13:02:17 +0000 (UTC) Received: from localhost ([::1]:37001 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d45XM-0008G7-NJ for patchwork-qemu-devel@patchwork.kernel.org; Fri, 28 Apr 2017 09:02:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d45Vj-0007df-9Q for qemu-devel@nongnu.org; Fri, 28 Apr 2017 09:00:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d45Vd-0002h8-Oy for qemu-devel@nongnu.org; Fri, 28 Apr 2017 09:00:35 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:33751) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d45Vd-0002gD-Is for qemu-devel@nongnu.org; Fri, 28 Apr 2017 09:00:29 -0400 Received: by mail-pf0-x243.google.com with SMTP id b23so1473187pfc.0 for ; Fri, 28 Apr 2017 06:00:29 -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=w080vkhPct8FjD9At21chm1NZQov1YFJUNZXM8EDnQM=; b=NzjUk0OZFKYsayRk/Yh3SKUh9NICrZbiVegq+aMQqrHqL7GhmG9BizDwT9SCnfnUGs N2IXPwsPvQdMScSvIYJqSZMPQ28WgJbmxMs4OpmPehKNPvaciEBR/1xYQwwYog+rDz9I xpLL+eWkmAB2yUhgXpJABPEUkvuZL9pHPgLSxU8V/HttR/FfY7QC+xVP5SdaaG4kUZZg rdzk2hu44zg1JLxlmA9wawbkO9COeNha95bkAIr0T6nRktcai94C4yQqRGlwWk8UMPV0 4Za9NAFwQFpkK+BFin3lvhKgkTCQ6t6DXh1y80wa5G6CC+oIb99JZ5n9RuyAQhkARQoO 3Tcg== 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=w080vkhPct8FjD9At21chm1NZQov1YFJUNZXM8EDnQM=; b=pi48mFNzRmojX+3NepL0iK5EtU0vKdX3yHVewvPI4Ru4fqzSC6xuzCC+05EWlgIloH 5M1k23DC/XXtwDs5y2gC75V9R7lK4dO8FMm2pffiyWVG+NrtcFP/qnsGZEZxpU+UWJCB lj8xXCQtESjGGoEE4tzocg6anh4DQqS4VynXQgw3fD8xe/d3I4sznHGpyDx/T1cH18mG S+VxmnVHeALg6BKK9L2YtZg7rU6zsCiUdSx1OLiLht0iL+JbYMxYUMgLY5au9Ev2ajNV brKCJuE7V04dPf00ywh3zlcx9qi4LeRm321yGz61E/4bntaGtUnj30VHvH1HHbDOGBpD QSzQ== X-Gm-Message-State: AN3rC/5r2i2IAWY+4sphrXVrmFosBI+5MVm/yMgIMhPZed34G9LautWV DURzcXkaKV+CPg== X-Received: by 10.84.143.36 with SMTP id 33mr5629328ply.142.1493384428692; Fri, 28 Apr 2017 06:00:28 -0700 (PDT) Received: from fma-dfsg.ipads-lab.se.sjtu.edu.cn ([69.85.85.101]) by smtp.gmail.com with ESMTPSA id i189sm10621181pgd.61.2017.04.28.06.00.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 06:00:28 -0700 (PDT) From: Zihan Yang To: qemu-devel@nongnu.org Date: Fri, 28 Apr 2017 20:55:10 +0800 Message-Id: <1493384110-32060-4-git-send-email-tgnyang@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493384110-32060-1-git-send-email-tgnyang@gmail.com> References: <1493384110-32060-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:c00::243 Subject: [Qemu-devel] [PATCH 3/3] hw/s390: replace exit with unrealize during class init of virtio-ccw 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 Currently the virtio_ccw_device_class_init function sets dc->exit, which is the exit callback of DeviceClass. It should be converted to dc->unrealize since exit callback of DeviceClass will be removed in the future. Signed-off-by: Zihan Yang --- hw/s390x/virtio-ccw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 91b43ac..5c193a8 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -1621,13 +1621,12 @@ static void virtio_ccw_busdev_realize(DeviceState *dev, Error **errp) virtio_ccw_device_realize(_dev, errp); } -static int virtio_ccw_busdev_exit(DeviceState *dev) +static void virtio_ccw_busdev_unrealize(DeviceState *dev, Error **errp) { VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev; VirtIOCCWDeviceClass *_info = VIRTIO_CCW_DEVICE_GET_CLASS(dev); _info->exit(_dev); - return 0; } static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev, @@ -1645,7 +1644,7 @@ static void virtio_ccw_device_class_init(ObjectClass *klass, void *data) k->unplug = virtio_ccw_busdev_unplug; dc->realize = virtio_ccw_busdev_realize; - dc->exit = virtio_ccw_busdev_exit; + dc->unrealize = virtio_ccw_busdev_unrealize; dc->bus_type = TYPE_VIRTUAL_CSS_BUS; }