From patchwork Tue Apr 12 17:54:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nutan Shinde X-Patchwork-Id: 8813271 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 81D1EC0553 for ; Tue, 12 Apr 2016 17:55:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF58D2013A for ; Tue, 12 Apr 2016 17:55:05 +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 2B46620138 for ; Tue, 12 Apr 2016 17:55:05 +0000 (UTC) Received: from localhost ([::1]:54468 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq2Wm-0003hE-Hz for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Apr 2016 13:55:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq2Wf-0003fO-CX for qemu-devel@nongnu.org; Tue, 12 Apr 2016 13:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aq2Wb-0007D9-6X for qemu-devel@nongnu.org; Tue, 12 Apr 2016 13:54:57 -0400 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]:34172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq2Wa-0007D1-VY for qemu-devel@nongnu.org; Tue, 12 Apr 2016 13:54:53 -0400 Received: by mail-pa0-x244.google.com with SMTP id hb4so1859040pac.1 for ; Tue, 12 Apr 2016 10:54:52 -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=RSM8p3SF1NCUDX+aQRHFLcOXNEtFipnUa1YsQMPhYRA=; b=S2hEa2P9Zar3FW8I9OOI7e2tBzuWY1Ssng2x393t484aUIMAqIGzaCzMAs4SwaJSvD 7mLwtBIAyNQdcQVn6xFiCP18EocwO8M2dJUJHsOwL15prLGE1fBgpMSIv8Q6i54mPpcl 3ffLifWdUZLYgs9L9gmWkxg4WT9W5SInRTaFgLOOxyqql5eei/RDtIWzLONRaRXEM2NC zek49lIEGWwVT+ltFr2pTgzNM/NpimeNcxD5QVeri1BIaRMQYs+/CKSbl/Hm9ug8wGuM m1R6QZaQyLa2LBp8ljGMS8IdONkcR41Eg5uHdWwbv7pEWWsaN7pBqqHJ7ULoLAXPu7FP e89g== 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=RSM8p3SF1NCUDX+aQRHFLcOXNEtFipnUa1YsQMPhYRA=; b=NeAiihO/yDWeMsTYOoH1dASpaZgKwSPVx06FJ5rZiQayYVw2HWKfwzPh9ZFuMYlSJp c/UCSvdJx2FFA60IBJcytC1wAcdrkzb1HVtZ2IbkLvU21x1UX7TPf4rBAjEHTZv4Bf/D Q32MRqeaBUkaU8Pggdo49DDmQIOHiFvnWvtEw8BD/BuSHsMPJrG5UUuFscHUhu2Fclbu 4OsVFehU69OEomlPSg0JQ7TB2chvEjb/lD630wlzXot5a0sYSgSJZsZYPsJ8Rq+Ae8Ny K76WCpaSwSoXefl+E7nOaEtPy7NWjG4Z4hp1EAd5X6RQPpyCLbwH3oXh3WLY5C1r+Zzb OGpw== X-Gm-Message-State: AOPr4FUSeaXWWao2f+uzzReALiIBEBW27YfJbwfiWx7zirqC0RvrNDSFMpIyHtMZdJ0u/Q== X-Received: by 10.66.221.167 with SMTP id qf7mr6406848pac.94.1460483691687; Tue, 12 Apr 2016 10:54:51 -0700 (PDT) Received: from localhost.localdomain ([103.51.73.179]) by smtp.gmail.com with ESMTPSA id dh8sm45224514pad.46.2016.04.12.10.54.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Apr 2016 10:54:50 -0700 (PDT) From: Nutan Shinde To: qemu-devel@nongnu.org Date: Tue, 12 Apr 2016 23:24:39 +0530 Message-Id: <1460483679-4850-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::244 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.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nutan Shinde , kraxel@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 This changes is required because the return type of exit(error) function is not used. This patch only has changes for files in hw/audio package. Signed-off-by: Nutan Shinde --- hw/audio/hda-codec.c | 3 +-- hw/audio/intel-hda.c | 3 +-- hw/audio/intel-hda.h | 2 +- include/hw/qdev-core.h | 2 +- 4 files changed, 4 insertions(+), 6 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/audio/intel-hda.h b/hw/audio/intel-hda.h index d784bcf..53b78da 100644 --- a/hw/audio/intel-hda.h +++ b/hw/audio/intel-hda.h @@ -38,7 +38,7 @@ typedef struct HDACodecDeviceClass DeviceClass parent_class; int (*init)(HDACodecDevice *dev); - int (*exit)(HDACodecDevice *dev); + void (*exit)(HDACodecDevice *dev); void (*command)(HDACodecDevice *dev, uint32_t nid, uint32_t data); void (*stream)(HDACodecDevice *dev, uint32_t stnr, bool running, bool output); } HDACodecDeviceClass; diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 1ce02b2..0b635bd 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -30,7 +30,7 @@ typedef enum DeviceCategory { } DeviceCategory; typedef int (*qdev_initfn)(DeviceState *dev); -typedef int (*qdev_event)(DeviceState *dev); +typedef void (*qdev_event)(DeviceState *dev); typedef void (*qdev_resetfn)(DeviceState *dev); typedef void (*DeviceRealize)(DeviceState *dev, Error **errp); typedef void (*DeviceUnrealize)(DeviceState *dev, Error **errp);