From patchwork Thu Mar 24 17:18:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nutan Shinde X-Patchwork-Id: 8663141 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9D518C0553 for ; Thu, 24 Mar 2016 17:18:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF58020376 for ; Thu, 24 Mar 2016 17:18:46 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id D1350202B8 for ; Thu, 24 Mar 2016 17:18:45 +0000 (UTC) Received: from localhost ([::1]:52003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8uC-0003Pv-UL for patchwork-qemu-devel@patchwork.kernel.org; Thu, 24 Mar 2016 13:18:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8u4-0003Pe-5f for qemu-devel@nongnu.org; Thu, 24 Mar 2016 13:18:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj8u0-00033E-0V for qemu-devel@nongnu.org; Thu, 24 Mar 2016 13:18:36 -0400 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]:34009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj8tz-000339-HA for qemu-devel@nongnu.org; Thu, 24 Mar 2016 13:18:31 -0400 Received: by mail-pa0-x241.google.com with SMTP id hj7so4129413pac.1 for ; Thu, 24 Mar 2016 10:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=P6cdoopaa05BiifOsdZ6jREbdU9OMmaqL3/dEv3bF0g=; b=acuFYHw90Wug0mbf2fa82VLFs42Qo1Bnl8qGjuj0NiwuDaa1VbWE/xc3nQS1Iy3PB/ OtoCMKFOIOa3+NbEqcOOGO6IknV0L4gaxNLr1I8Gv/5gbzwIwcIRi7GhC3omDPz4xW+Z kXR28Xuwzd7lDPS0mAnb7D6aq8criNIcBfmlTElKDGku0lm9bzr8InOAUD5yN7ragGo4 cif4BQWl1s3QLCZSZbo3rKtqa9Z/4/yXgLiUt9/q2Y2qSKkNC/l+xTtJ+tF6QzWmmgEE 1+1qbXY21ZZ8jGAQpSJkltwKqzlOM/Qnq5iQvOnvOsHFTBun3HgrysARVl3mkFzol+jq OvIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=P6cdoopaa05BiifOsdZ6jREbdU9OMmaqL3/dEv3bF0g=; b=VxKsKs/LOU7T2DgY+wtj8ClvrwzvBD/QFfajHCaYdQ07xPagCXGzeu45POIN1nCyzP uiYsTnXeRkLdx210x48q9lxeKCiyPLH9fnoQyNQ1gQ0QcSkTJvKgFZteAbTF0KiH75dE rpoU7UGP5fRqJTy0VgMEQe6ZWoDkxHxuFlHNxeE4AmMZJY3j1+JfK55xpv9CWPHNTljL PymmCsmcbNtkV1gH6Pbwtmpt6rkVsLaH/ACF7ICLxhOvdAqQXR2HHsXh+WvXmVAUAHMl IBoVP8tL9Pc4CGMZobUIdGAAR/P+Q/QdRDRnm+kPQSLwCY4Hep+0DPJc8yW60vkCC1i8 L8Uw== X-Gm-Message-State: AD7BkJJ5B3aeUL+M6AZkcPkgHgJx+8DIARH1ZsdkxltxLYcrEZMQ72x6kLrAc74byitIOQ== X-Received: by 10.66.144.4 with SMTP id si4mr14612490pab.0.1458839910134; Thu, 24 Mar 2016 10:18:30 -0700 (PDT) Received: from localhost.localdomain ([103.51.73.190]) by smtp.gmail.com with ESMTPSA id wh9sm11433776pab.8.2016.03.24.10.18.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Mar 2016 10:18:29 -0700 (PDT) From: Nutan Shinde To: qemu-devel@nongnu.org Date: Thu, 24 Mar 2016 22:48:17 +0530 Message-Id: <1458839897-4609-1-git-send-email-nutanshinde1992@gmail.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::241 Cc: Nutan Shinde Subject: [Qemu-devel] [PATCH] Change return type of functions that are named *_exit or *_exitfn in hw/ from int to void. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Functions that are named *_exit or *_exitfn in hw/, all return 0. Changed return type of these methods from int to void. Also, removed check where values were returned from these methods. Signed-off-by: Nutan Shinde --- hw/audio/hda-codec.c | 3 +-- hw/audio/intel-hda.c | 3 +-- hw/char/sclpconsole-lm.c | 3 +-- hw/char/sclpconsole.c | 3 +-- hw/s390x/virtio-ccw.c | 7 ++----- hw/usb/ccid-card-emulated.c | 3 +-- hw/usb/dev-smartcard-reader.c | 8 ++------ 7 files changed, 9 insertions(+), 21 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 52d4640..5402cd1 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -520,7 +520,7 @@ static int hda_audio_init(HDACodecDevice *hda, const struct desc_codec *desc) return 0; } -static int hda_audio_exit(HDACodecDevice *hda) +static void hda_audio_exit(HDACodecDevice *hda) { HDAAudioState *a = HDA_AUDIO(hda); HDAAudioStream *st; @@ -539,7 +539,6 @@ static int hda_audio_exit(HDACodecDevice *hda) } } AUD_remove_card(&a->card); - return 0; } static int hda_audio_post_load(void *opaque, int version) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index d372d4a..404cfcf 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -66,7 +66,7 @@ static int hda_codec_dev_init(DeviceState *qdev) return cdc->init(dev); } -static int hda_codec_dev_exit(DeviceState *qdev) +static void hda_codec_dev_exit(DeviceState *qdev) { HDACodecDevice *dev = DO_UPCAST(HDACodecDevice, qdev, qdev); HDACodecDeviceClass *cdc = HDA_CODEC_DEVICE_GET_CLASS(dev); @@ -74,7 +74,6 @@ static int hda_codec_dev_exit(DeviceState *qdev) if (cdc->exit) { cdc->exit(dev); } - return 0; } HDACodecDevice *hda_codec_find(HDACodecBus *bus, uint32_t cad) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 7d4ff81..d2fe30a 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/char/sclpconsole-lm.c @@ -328,9 +328,8 @@ static int console_init(SCLPEvent *event) return 0; } -static int console_exit(SCLPEvent *event) +static void console_exit(SCLPEvent *event) { - return 0; } static void console_reset(DeviceState *dev) diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c index 45997ff..da7b503 100644 --- a/hw/char/sclpconsole.c +++ b/hw/char/sclpconsole.c @@ -242,9 +242,8 @@ static void console_reset(DeviceState *dev) scon->notify = false; } -static int console_exit(SCLPEvent *event) +static void console_exit(SCLPEvent *event) { - return 0; } static Property console_properties[] = { diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index cb887ba..74e989b 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -877,7 +877,7 @@ out_err: g_free(sch); } -static int virtio_ccw_exit(VirtioCcwDevice *dev) +static void virtio_ccw_exit(VirtioCcwDevice *dev) { SubchDev *sch = dev->sch; @@ -889,7 +889,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) @@ -1734,12 +1733,10 @@ 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_exit(DeviceState *dev) { VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev; VirtIOCCWDeviceClass *_info = VIRTIO_CCW_DEVICE_GET_CLASS(dev); - - return _info->exit(_dev); } static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev, diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c index 9ddd5ad..9962786 100644 --- a/hw/usb/ccid-card-emulated.c +++ b/hw/usb/ccid-card-emulated.c @@ -547,7 +547,7 @@ static int emulated_initfn(CCIDCardState *base) return 0; } -static int emulated_exitfn(CCIDCardState *base) +static void emulated_exitfn(CCIDCardState *base) { EmulatedState *card = EMULATED_CCID_CARD(base); VEvent *vevent = vevent_new(VEVENT_LAST, NULL, NULL); @@ -564,7 +564,6 @@ static int emulated_exitfn(CCIDCardState *base) qemu_mutex_destroy(&card->handle_apdu_mutex); qemu_mutex_destroy(&card->vreader_mutex); qemu_mutex_destroy(&card->event_list_mutex); - return 0; } static Property emulated_card_properties[] = { diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 96a1a13..6cc18b1 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -507,14 +507,13 @@ static void ccid_card_apdu_from_guest(CCIDCardState *card, } } -static int ccid_card_exitfn(CCIDCardState *card) +static void ccid_card_exitfn(CCIDCardState *card) { CCIDCardClass *cc = CCID_CARD_GET_CLASS(card); if (cc->exitfn) { return cc->exitfn(card); } - return 0; } static int ccid_card_initfn(CCIDCardState *card) @@ -1276,9 +1275,8 @@ void ccid_card_card_inserted(CCIDCardState *card) ccid_on_slot_change(s, true); } -static int ccid_card_exit(DeviceState *qdev) +static void ccid_card_exit(DeviceState *qdev) { - int ret = 0; CCIDCardState *card = CCID_CARD(qdev); USBDevice *dev = USB_DEVICE(qdev->parent_bus->parent); USBCCIDState *s = USB_CCID_DEV(dev); @@ -1286,9 +1284,7 @@ static int ccid_card_exit(DeviceState *qdev) if (ccid_card_inserted(s)) { ccid_card_card_removed(card); } - ret = ccid_card_exitfn(card); s->card = NULL; - return ret; } static int ccid_card_init(DeviceState *qdev)