From patchwork Tue Oct 11 10:00:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 118916 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 8BED3B6F65 for ; Tue, 11 Oct 2011 21:39:25 +1100 (EST) Received: from localhost ([::1]:47949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZk0-0000wM-1T for incoming@patchwork.ozlabs.org; Tue, 11 Oct 2011 06:39:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:36159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZCl-0005iz-Fc for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:05:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDZCf-0000Wt-O0 for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:04:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDZCf-0000Wi-D5 for qemu-devel@nongnu.org; Tue, 11 Oct 2011 06:04:53 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9BA4q1H013261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Oct 2011 06:04:52 -0400 Received: from neno.neno (ovpn-116-17.ams2.redhat.com [10.36.116.17]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p9BA1lwA021320; Tue, 11 Oct 2011 06:04:48 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 11 Oct 2011 12:00:47 +0200 Message-Id: <7b79004bbfdeefc159ab822aed7a193b0ce7f207.1318326684.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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 27/36] 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 0b7ffa7..33e89a2 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; } @@ -488,7 +488,6 @@ static MigrationState *migrate_new(Monitor *mon, int64_t bandwidth_limit, { 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 b634994..f059183 100644 --- a/migration.h +++ b/migration.h @@ -38,7 +38,6 @@ struct MigrationState int (*get_error)(MigrationState *s); int (*close)(MigrationState *s); int (*write)(MigrationState *s, const void *buff, size_t size); - void (*cancel)(MigrationState *s); void *opaque; int blk; int shared;