qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH 01/11] migration: Remove MigrationState from migration_channel_incomming()
Date: Mon, 12 Jun 2017 12:03:25 +0200	[thread overview]
Message-ID: <d7fb3a8f-9aa2-6c09-5ee0-ebf41c8ce65d@redhat.com> (raw)
In-Reply-To: <20170601212921.30241-2-quintela@redhat.com>

On 01/06/2017 23:29, Juan Quintela wrote:
> All callers were calling migrate_get_current(), so do it inside the function.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Laurent Vivier <lvivier@redhat.com>

> ---
>  migration/channel.c | 5 +++--
>  migration/channel.h | 3 +--
>  migration/exec.c    | 2 +-
>  migration/fd.c      | 2 +-
>  migration/socket.c  | 3 +--
>  migration/tls.c     | 2 +-
>  6 files changed, 8 insertions(+), 9 deletions(-)
> 
> diff --git a/migration/channel.c b/migration/channel.c
> index eae1d9e..92f6f99 100644
> --- a/migration/channel.c
> +++ b/migration/channel.c
> @@ -19,9 +19,10 @@
>  #include "qapi/error.h"
>  #include "io/channel-tls.h"
>  
> -void migration_channel_process_incoming(MigrationState *s,
> -                                        QIOChannel *ioc)
> +void migration_channel_process_incoming(QIOChannel *ioc)
>  {
> +    MigrationState *s = migrate_get_current();
> +
>      trace_migration_set_incoming_channel(
>          ioc, object_get_typename(OBJECT(ioc)));
>  
> diff --git a/migration/channel.h b/migration/channel.h
> index 2e0a7e3..e4b4057 100644
> --- a/migration/channel.h
> +++ b/migration/channel.h
> @@ -18,8 +18,7 @@
>  
>  #include "io/channel.h"
>  
> -void migration_channel_process_incoming(MigrationState *s,
> -                                        QIOChannel *ioc);
> +void migration_channel_process_incoming(QIOChannel *ioc);
>  
>  void migration_channel_connect(MigrationState *s,
>                                 QIOChannel *ioc,
> diff --git a/migration/exec.c b/migration/exec.c
> index 9077024..fc78eeb 100644
> --- a/migration/exec.c
> +++ b/migration/exec.c
> @@ -49,7 +49,7 @@ static gboolean exec_accept_incoming_migration(QIOChannel *ioc,
>                                                 GIOCondition condition,
>                                                 gpointer opaque)
>  {
> -    migration_channel_process_incoming(migrate_get_current(), ioc);
> +    migration_channel_process_incoming(ioc);
>      object_unref(OBJECT(ioc));
>      return FALSE; /* unregister */
>  }
> diff --git a/migration/fd.c b/migration/fd.c
> index 0077a50..8a04dcd 100644
> --- a/migration/fd.c
> +++ b/migration/fd.c
> @@ -49,7 +49,7 @@ static gboolean fd_accept_incoming_migration(QIOChannel *ioc,
>                                               GIOCondition condition,
>                                               gpointer opaque)
>  {
> -    migration_channel_process_incoming(migrate_get_current(), ioc);
> +    migration_channel_process_incoming(ioc);
>      object_unref(OBJECT(ioc));
>      return FALSE; /* unregister */
>  }
> diff --git a/migration/socket.c b/migration/socket.c
> index 85bfdcc..50dc8d8 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -148,8 +148,7 @@ static gboolean socket_accept_incoming_migration(QIOChannel *ioc,
>      trace_migration_socket_incoming_accepted();
>  
>      qio_channel_set_name(QIO_CHANNEL(sioc), "migration-socket-incoming");
> -    migration_channel_process_incoming(migrate_get_current(),
> -                                       QIO_CHANNEL(sioc));
> +    migration_channel_process_incoming(QIO_CHANNEL(sioc));
>      object_unref(OBJECT(sioc));
>  
>  out:
> diff --git a/migration/tls.c b/migration/tls.c
> index bae9aca..d3abd6e 100644
> --- a/migration/tls.c
> +++ b/migration/tls.c
> @@ -74,7 +74,7 @@ static void migration_tls_incoming_handshake(QIOTask *task,
>          error_report_err(err);
>      } else {
>          trace_migration_tls_incoming_handshake_complete();
> -        migration_channel_process_incoming(migrate_get_current(), ioc);
> +        migration_channel_process_incoming(ioc);
>      }
>      object_unref(OBJECT(ioc));
>  }
> 

  parent reply	other threads:[~2017-06-12 10:03 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 21:29 [Qemu-devel] [PATCH 00/11] Misc migration cleanups Juan Quintela
2017-06-01 21:29 ` [Qemu-devel] [PATCH 01/11] migration: Remove MigrationState from migration_channel_incomming() Juan Quintela
2017-06-12  9:19   ` Peter Xu
2017-06-12 10:03   ` Laurent Vivier [this message]
2017-06-01 21:29 ` [Qemu-devel] [PATCH 02/11] migration: Move self_announce_delay() to misc.h Juan Quintela
2017-06-12  9:22   ` Peter Xu
2017-06-12 10:31   ` Laurent Vivier
2017-06-12 10:35     ` Juan Quintela
2017-06-12 10:43       ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 03/11] migration: Split registration functions from vmstate.h Juan Quintela
2017-06-12  9:29   ` Peter Xu
2017-06-12 10:36     ` Juan Quintela
2017-06-01 21:29 ` [Qemu-devel] [PATCH 04/11] migration: Move dump_vmsate_json_to_file() to misc.h Juan Quintela
2017-06-12  9:33   ` Peter Xu
2017-06-12 10:42   ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 05/11] migration: Move constants to savevm.h Juan Quintela
2017-06-12 10:44   ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 06/11] migration: Commands are only used inside migration.c Juan Quintela
2017-06-12 11:34   ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 07/11] migration: ram_control_* are implemented in qemu_file Juan Quintela
2017-06-12 11:39   ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 08/11] migration: create global_state.c Juan Quintela
2017-06-12 11:45   ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 09/11] migration: Move remaining exported functions to migration/misc.h Juan Quintela
2017-06-12  9:51   ` Peter Xu
2017-06-01 21:29 ` [Qemu-devel] [PATCH 10/11] migration: Move migration.h to migration/ Juan Quintela
2017-06-12  9:51   ` Peter Xu
2017-06-12 11:51   ` Laurent Vivier
2017-06-01 21:29 ` [Qemu-devel] [PATCH 11/11] migration: Remove unneeded includes Juan Quintela
2017-06-02  5:00 ` [Qemu-devel] [PATCH 00/11] Misc migration cleanups Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7fb3a8f-9aa2-6c09-5ee0-ebf41c8ce65d@redhat.com \
    --to=lvivier@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).