From patchwork Tue Sep 20 14:19:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 115565 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3F0A1B6F84 for ; Wed, 21 Sep 2011 00:58:28 +1000 (EST) Received: from localhost ([::1]:59280 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R61Bu-0005qD-3J for incoming@patchwork.ozlabs.org; Tue, 20 Sep 2011 10:20:54 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R61BO-0004tq-L4 for qemu-devel@nongnu.org; Tue, 20 Sep 2011 10:20:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R61BI-0008CQ-Uv for qemu-devel@nongnu.org; Tue, 20 Sep 2011 10:20:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R61BI-0008Bz-Iu for qemu-devel@nongnu.org; Tue, 20 Sep 2011 10:20:16 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8KEKFhv015201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Sep 2011 10:20:15 -0400 Received: from trasno.mitica (ovpn-113-56.phx2.redhat.com [10.3.113.56]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p8KEJv9g015328; Tue, 20 Sep 2011 10:20:14 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 20 Sep 2011 16:19:41 +0200 Message-Id: <1db698dd47c4f755c62b6498acd5029ccba53ec8.1316526970.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 13/23] migration: Remove migration cancel() callback 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org It is used only in one place Signed-off-by: Juan Quintela --- migration.c | 9 ++++----- migration.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/migration.c b/migration.c index d63150e..306ac4e 100644 --- a/migration.c +++ b/migration.c @@ -132,12 +132,12 @@ free_migrate_state: return -1; } +static void migrate_fd_cancel(MigrationState *s); + int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data) { - MigrationState *s = current_migration; - - if (s && s->state == MIG_STATE_ACTIVE) { - s->cancel(s); + if (current_migration) { + migrate_fd_cancel(current_migration); } return 0; } @@ -480,7 +480,6 @@ static MigrationState *migrate_create_state(Monitor *mon, { MigrationState *s = g_malloc0(sizeof(*s)); - s->cancel = migrate_fd_cancel; s->blk = blk; s->shared = inc; s->mon = NULL; diff --git a/migration.h b/migration.h index 6336afe..6949e19 100644 --- a/migration.h +++ b/migration.h @@ -38,7 +38,6 @@ struct MigrationState int (*get_error)(MigrationState *s); int (*close)(MigrationState *s, bool flush); int (*write)(MigrationState *s, const void *buff, size_t size); - void (*cancel)(MigrationState *s); void *opaque; int blk; int shared;