From nobody Fri Oct 24 21:57:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520272304267295.0231365245113; Mon, 5 Mar 2018 09:51:44 -0800 (PST) Received: from localhost ([::1]:50712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esuH1-0001vK-45 for importer@patchew.org; Mon, 05 Mar 2018 12:51:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1esuFy-0001WO-Ih for qemu-devel@nongnu.org; Mon, 05 Mar 2018 12:50:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1esuFt-0006Wh-CW for qemu-devel@nongnu.org; Mon, 05 Mar 2018 12:50:38 -0500 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:34294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1esuFs-0006WN-Qv; Mon, 05 Mar 2018 12:50:33 -0500 Received: by mail-pl0-x242.google.com with SMTP id u13-v6so10086059plq.1; Mon, 05 Mar 2018 09:50:32 -0800 (PST) Received: from localhost.localdomain ([185.216.48.174]) by smtp.gmail.com with ESMTPSA id 191sm25978412pfv.167.2018.03.05.09.50.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 09:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Nwh9G5QMuTfg6WEfzg7UH4VD6e/Kgcz4VvXGR8qoarM=; b=ihUOoltWPYn+EE/ZjTBaW14paTd4i/lXRfnVyaFtnBg0uYsiGh/q5vb1ZBzdOfdPM2 KotgkLo88LaYeUkrYN2UV9JaWU59sqTwB/Ea1HpwaMIsdHF3J3YCgZPRZHgC8QlqZCRC zx+SGffrl4eSBS2KnNCJ14Fn6f/pqIS0SBblcBc4uwIKpKeerJ/UPRWBR4NIexVXOa9W 7t7LXaSuGGIbOO52L4f3mRNhYm30rgQNmobCOpxBtmILDj60Yuuh/j+gmgYNB38BgqZb MiZmPDwSI9vcvEpCVsvFBszI7SPqVNgLobDwlfyuLWdKwIukQSmtdKF9ZTPsOEvXwrYg Pbng== 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; bh=Nwh9G5QMuTfg6WEfzg7UH4VD6e/Kgcz4VvXGR8qoarM=; b=m1WJi8DVpQ4CCbu1g3APEo5Hzr/pbjClLT1V8K4JZZPGW18RafxIlqciCr26WNHWMY NLozZTxxE5B1nIt9ss0tBSAKcXRvdf6d18JlvpsYaWlxLaPv8BH7pmPcCcFl3yfx/2OX 5ilsJgHa5mvLsvijWQfS4PDBZK/CPq4UAeoIE3qpnAflu9RjULOATw3v1uTvuk1jLSzt xT842kuv4Pe7Wbvp0nOz4c1UzW+Jx+youcFaWRNZ3QSGvLcUaaPpYo0nTtiWgKlvWg8Z Tsq9FEb5hSs90rRnhWeaS96Mp0xeZnAComdbOOpO0LRgxvGJhmSE4kmYKuwskC3hmNoB NH2Q== X-Gm-Message-State: APf1xPBV2ayXtcWk19Ityj2Cst+JvBeCk0Eegd0CPB73doVbiRzc+AcW k3HAIW+oA9afygnJpynS+OZ287YS X-Google-Smtp-Source: AG47ELuYCgS9GMyZTZGBTwFNgS/l7T1T2WAQ/MgHwH+fsKs0DTwu1EXq7rXrFQRu0kx6U5Mi92NrEg== X-Received: by 2002:a17:902:1a4:: with SMTP id b33-v6mr13634033plb.321.1520272230803; Mon, 05 Mar 2018 09:50:30 -0800 (PST) From: Nia Alarie To: qemu-devel@nongnu.org Date: Mon, 5 Mar 2018 17:49:14 +0000 Message-Id: <20180305174914.25931-1-nia.alarie@gmail.com> X-Mailer: git-send-email 2.16.2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::242 Subject: [Qemu-devel] [PATCH v2] s390x/sclpconsole: Remove dead code - delete error handlers 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: jim@groklearning.com, stefanha@gmail.com, cohuck@redhat.com, borntraeger@de.ibm.com, qemu-s390x@nongnu.org, joel@jms.id.au, Nia Alarie , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The other event handlers (quiesce and cpu) do not define these handlers, and this one does nothing, so it can be removed. virtio_ccw_exit always returns 0, so change its return type to void. Signed-off-by: Nia Alarie Reviewed-by: Christian Borntraeger --- hw/char/sclpconsole-lm.c | 6 ------ hw/char/sclpconsole.c | 6 ------ hw/s390x/event-facility.c | 14 -------------- hw/s390x/virtio-ccw.c | 6 +++--- hw/s390x/virtio-ccw.h | 2 +- include/hw/s390x/event-facility.h | 1 - 6 files changed, 4 insertions(+), 31 deletions(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index c500bdaf29..84efd8df73 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/char/sclpconsole-lm.c @@ -318,11 +318,6 @@ static int console_init(SCLPEvent *event) return 0; } =20 -static int console_exit(SCLPEvent *event) -{ - return 0; -} - static void console_reset(DeviceState *dev) { SCLPEvent *event =3D SCLP_EVENT(dev); @@ -349,7 +344,6 @@ static void console_class_init(ObjectClass *klass, void= *data) dc->reset =3D console_reset; dc->vmsd =3D &vmstate_sclplmconsole; ec->init =3D console_init; - ec->exit =3D console_exit; ec->get_send_mask =3D send_mask; ec->get_receive_mask =3D receive_mask; ec->can_handle_event =3D can_handle_event; diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index d0265dfa7a..e6ba0a46bd 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -246,11 +246,6 @@ static void console_reset(DeviceState *dev) scon->notify =3D false; } =20 -static int console_exit(SCLPEvent *event) -{ - return 0; -} - static Property console_properties[] =3D { DEFINE_PROP_CHR("chardev", SCLPConsole, chr), DEFINE_PROP_END_OF_LIST(), @@ -265,7 +260,6 @@ static void console_class_init(ObjectClass *klass, void= *data) dc->reset =3D console_reset; dc->vmsd =3D &vmstate_sclpconsole; ec->init =3D console_init; - ec->exit =3D console_exit; ec->get_send_mask =3D send_mask; ec->get_receive_mask =3D receive_mask; ec->can_handle_event =3D can_handle_event; diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index 155a69467b..79de3c738f 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -431,26 +431,12 @@ static void event_realize(DeviceState *qdev, Error **= errp) } } =20 -static void event_unrealize(DeviceState *qdev, Error **errp) -{ - SCLPEvent *event =3D SCLP_EVENT(qdev); - SCLPEventClass *child =3D SCLP_EVENT_GET_CLASS(event); - if (child->exit) { - int rc =3D child->exit(event); - if (rc < 0) { - error_setg(errp, "SCLP event exit failed."); - return; - } - } -} - static void event_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); =20 dc->bus_type =3D TYPE_SCLP_EVENTS_BUS; dc->realize =3D event_realize; - dc->unrealize =3D event_unrealize; } =20 static const TypeInfo sclp_event_type_info =3D { diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 8f7fbc2ab7..0773818a82 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -752,7 +752,7 @@ out_err: g_free(sch); } =20 -static int virtio_ccw_exit(VirtioCcwDevice *dev) +static void virtio_ccw_exit(VirtioCcwDevice *dev) { CcwDevice *ccw_dev =3D CCW_DEVICE(dev); SubchDev *sch =3D ccw_dev->sch; @@ -765,7 +765,6 @@ static int virtio_ccw_exit(VirtioCcwDevice *dev) release_indicator(&dev->routes.adapter, dev->indicators); dev->indicators =3D NULL; } - return 0; } =20 static void virtio_ccw_net_realize(VirtioCcwDevice *ccw_dev, Error **errp) @@ -1710,7 +1709,8 @@ static int virtio_ccw_busdev_exit(DeviceState *dev) VirtioCcwDevice *_dev =3D (VirtioCcwDevice *)dev; VirtIOCCWDeviceClass *_info =3D VIRTIO_CCW_DEVICE_GET_CLASS(dev); =20 - return _info->exit(_dev); + _info->exit(_dev); + return 0; } =20 static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev, diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 3905f3a3d6..8ffe7fe095 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -76,7 +76,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; =20 /* Performance improves when virtqueue kick processing is decoupled from t= he diff --git a/include/hw/s390x/event-facility.h b/include/hw/s390x/event-fac= ility.h index 5119b9b7f0..b913f85edc 100644 --- a/include/hw/s390x/event-facility.h +++ b/include/hw/s390x/event-facility.h @@ -174,7 +174,6 @@ typedef struct SCLPEvent { typedef struct SCLPEventClass { DeviceClass parent_class; int (*init)(SCLPEvent *event); - int (*exit)(SCLPEvent *event); =20 /* get SCLP's send mask */ unsigned int (*get_send_mask)(void); --=20 2.16.2