From nobody Mon Apr 29 10:11:11 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) 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; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1508748475736355.76342295477514; Mon, 23 Oct 2017 01:47:55 -0700 (PDT) Received: from localhost ([::1]:37518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6YOf-0005SK-7N for importer@patchew.org; Mon, 23 Oct 2017 04:47:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6YMl-0004AS-Rr for qemu-devel@nongnu.org; Mon, 23 Oct 2017 04:45:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6YMk-0001AM-SO for qemu-devel@nongnu.org; Mon, 23 Oct 2017 04:45:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47708) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6YMk-0001A5-K2 for qemu-devel@nongnu.org; Mon, 23 Oct 2017 04:45:46 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1346C0587C0 for ; Mon, 23 Oct 2017 08:45:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-195.ams2.redhat.com [10.36.117.195]) by smtp.corp.redhat.com (Postfix) with ESMTP id 461385DA66; Mon, 23 Oct 2017 08:45:40 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 2C25E278; Mon, 23 Oct 2017 10:45:38 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1346C0587C0 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Mon, 23 Oct 2017 10:45:38 +0200 Message-Id: <20171023084538.18210-2-kraxel@redhat.com> In-Reply-To: <20171023084538.18210-1-kraxel@redhat.com> References: <20171023084538.18210-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 23 Oct 2017 08:45:45 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/1] usb-ccid: remove needless migration state code 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau This code appears to be unused since its introduction. We need to keep the state_vmstate field byte in VMState for compatibility reasons. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 20171013125533.9153-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/dev-smartcard-reader.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 0c77d2a41d..e334d3be11 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -270,11 +270,6 @@ typedef struct BulkIn { uint32_t pos; } BulkIn; =20 -enum { - MIGRATION_NONE, - MIGRATION_MIGRATED, -}; - typedef struct CCIDBus { BusState qbus; } CCIDBus; @@ -306,9 +301,6 @@ typedef struct USBCCIDState { CCID_ProtocolDataStructure abProtocolDataStructure; uint32_t ulProtocolDataStructureSize; uint32_t state_vmstate; - uint32_t migration_target_ip; - uint16_t migration_target_port; - uint8_t migration_state; uint8_t bmSlotICCState; uint8_t powered; uint8_t notify_slot_change; @@ -1243,9 +1235,6 @@ int ccid_card_ccid_attach(CCIDCardState *card) USBCCIDState *s =3D USB_CCID_DEV(dev); =20 DPRINTF(s, 1, "CCID Attach\n"); - if (s->migration_state =3D=3D MIGRATION_MIGRATED) { - s->migration_state =3D MIGRATION_NONE; - } return 0; } =20 @@ -1341,9 +1330,6 @@ static void ccid_realize(USBDevice *dev, Error **errp) s->intr =3D usb_ep_get(dev, USB_TOKEN_IN, CCID_INT_IN_EP); s->bulk =3D usb_ep_get(dev, USB_TOKEN_IN, CCID_BULK_IN_EP); s->card =3D NULL; - s->migration_state =3D MIGRATION_NONE; - s->migration_target_ip =3D 0; - s->migration_target_port =3D 0; s->dev.speed =3D USB_SPEED_FULL; s->dev.speedmask =3D USB_SPEED_MASK_FULL; s->notify_slot_change =3D false; @@ -1379,13 +1365,6 @@ static int ccid_pre_save(void *opaque) USBCCIDState *s =3D opaque; =20 s->state_vmstate =3D s->dev.state; - if (s->dev.attached) { - /* - * Migrating an open device, ignore reconnection CHR_EVENT to avoi= d an - * erroneous detach. - */ - s->migration_state =3D MIGRATION_MIGRATED; - } =20 return 0; } @@ -1452,7 +1431,7 @@ static VMStateDescription ccid_vmstate =3D { VMSTATE_STRUCT_ARRAY(pending_answers, USBCCIDState, PENDING_ANSWERS_NUM, 1, answer_vmstate, Answer), VMSTATE_UINT32(pending_answers_num, USBCCIDState), - VMSTATE_UINT8(migration_state, USBCCIDState), + VMSTATE_UNUSED(1), /* was migration_state */ VMSTATE_UINT32(state_vmstate, USBCCIDState), VMSTATE_END_OF_LIST() } --=20 2.9.3