From patchwork Tue Apr 12 18:30:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nutan Shinde X-Patchwork-Id: 8814191 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E50929F3D1 for ; Tue, 12 Apr 2016 18:30:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 157A5201C8 for ; Tue, 12 Apr 2016 18:30:31 +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 2BBAA20166 for ; Tue, 12 Apr 2016 18:30:30 +0000 (UTC) Received: from localhost ([::1]:55060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq353-0002FL-HM for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Apr 2016 14:30:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq34s-0002BT-55 for qemu-devel@nongnu.org; Tue, 12 Apr 2016 14:30:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aq34r-00087h-0C for qemu-devel@nongnu.org; Tue, 12 Apr 2016 14:30:18 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:33062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aq34q-00087b-Ma for qemu-devel@nongnu.org; Tue, 12 Apr 2016 14:30:16 -0400 Received: by mail-wm0-x244.google.com with SMTP id y144so7661636wmd.0 for ; Tue, 12 Apr 2016 11:30:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=ZiYSN+OWwyHzTEttu3jeB4/B4diNIRwdNDIBUeEoEiI=; b=N4YX8tEKBDiVIr/fKM6zrzBjRaqmIlEFlDh4FjSRolWZw1pIvZ/POKMZKBH+srEVcH OImJYv0Y/G6cJF4Kt1vmoblpe+M8LmTX2VyCGDuziGS70g3CkIpcKYx78VA02yH1mBkH imni6VF/VtcGvoFTfWZPMHjYTgbLWkLiqL/ODAszX0gllfkd4CYGWyB11MlbvOY6hoR5 fAuTH/zPReYF57xOP9hp8ov5tkWtO4jffDs6ROYXizU+04CUkTkkC5AP85ye/l2UXtab TyauPl1yf7F8HjOzknkmMSEdAYiVhDgZrnNSzK+t9zsNTflAfpCZyJdf0O52Hkf/s09J z0bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=ZiYSN+OWwyHzTEttu3jeB4/B4diNIRwdNDIBUeEoEiI=; b=JY3MECcec8+s1mPJS6e2DnaX5gmIs000NwSCsZCo+6Gpv33ZE702z8zNkbZW2Nbamx lbjC6LwRc2gzuftJiWSnqTqtDxV3+tJbf8yOcmju79Xm1ScoeqBaDRVuddB//XOkGY3M FsClgAFhNYeO2Cy7F/3xAhSAgpedHWgEVT6s0u6Afx1cJ6d4LFZSgZDQrtLY5o6Aisoq C4ZX+W9ehboC0Wgrg+VovN3uVfmKa+LQrUR62obdwlDTGJJ/qatfWhMlj7s8wGSbVrkl 26f9UPU3088PPH8RaCghzSYTLNIQDafwl2E/0rSb20jhM7br0acs0pZNojw5E3OiU8uL X3IA== X-Gm-Message-State: AOPr4FUY2uwmf89sYcnszl/GZ/n+WyVEb4P++ZLkg6OdOFq0FVQEtUtea4OFuQ1ily/zWctQlt9PHis7/LqfEg== MIME-Version: 1.0 X-Received: by 10.194.171.66 with SMTP id as2mr5349703wjc.110.1460485816026; Tue, 12 Apr 2016 11:30:16 -0700 (PDT) Received: by 10.194.38.101 with HTTP; Tue, 12 Apr 2016 11:30:15 -0700 (PDT) In-Reply-To: <1460485734-6198-1-git-send-email-nutanshinde1992@gmail.com> References: <1460485734-6198-1-git-send-email-nutanshinde1992@gmail.com> Date: Wed, 13 Apr 2016 00:00:15 +0530 Message-ID: From: Nutan Shinde To: QEMU Developers , kraxel@redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] Fwd: [PATCH v2 5/5] Change return type of functions that are named *_exit or *_exitfn in hw/usb 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: , 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, HTML_MESSAGE, 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 change is required because the return type of exit(error) function is not used. This patch only has changes for files in hw/usb package. Signed-off-by: Nutan Shinde --- hw/usb/ccid-card-emulated.c | 3 +-- hw/usb/ccid.h | 2 +- hw/usb/dev-smartcard-reader.c | 11 ++++------- 3 files changed, 6 insertions(+), 10 deletions(-) static int ccid_card_initfn(CCIDCardState *card) @@ -1277,9 +1276,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); @@ -1287,9 +1285,8 @@ static int ccid_card_exit(DeviceState *qdev) if (ccid_card_inserted(s)) { ccid_card_card_removed(card); } - ret = ccid_card_exitfn(card); + ccid_card_exitfn(card); s->card = NULL; - return ret; } static int ccid_card_init(DeviceState *qdev) -- 1.9.1 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/ccid.h b/hw/usb/ccid.h index 9334da8..1f07011 100644 --- a/hw/usb/ccid.h +++ b/hw/usb/ccid.h @@ -33,7 +33,7 @@ typedef struct CCIDCardClass { void (*apdu_from_guest)(CCIDCardState *card, const uint8_t *apdu, uint32_t len); - int (*exitfn)(CCIDCardState *card); + void (*exitfn)(CCIDCardState *card); int (*initfn)(CCIDCardState *card); } CCIDCardClass; diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index af4b851..aeb357f 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -508,14 +508,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); + cc->exitfn(card); } - return 0; }