qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH 12/12] migration: migration.h was not needed
Date: Mon, 15 May 2017 13:10:59 +0200	[thread overview]
Message-ID: <878tlyfk8s.fsf@secure.mitica> (raw)
In-Reply-To: <20170512175841.GK2069@work-vm> (David Alan Gilbert's message of "Fri, 12 May 2017 18:58:42 +0100")

"Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
> * Juan Quintela (quintela@redhat.com) wrote:
>> This files don't use any function from migration.h, so drop it.
>> 
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>>  block/qed.c             | 1 -
>>  hw/i386/pc_q35.c        | 1 -
>>  hw/virtio/vhost-user.c  | 1 -
>>  hw/virtio/vhost-vsock.c | 1 -
>>  hw/virtio/virtio.c      | 1 -
>>  monitor.c               | 1 -
>>  6 files changed, 6 deletions(-)
>> 
>> diff --git a/block/qed.c b/block/qed.c
>> index fd76817..8d899fd 100644
>> --- a/block/qed.c
>> +++ b/block/qed.c
>> @@ -19,7 +19,6 @@
>>  #include "trace.h"
>>  #include "qed.h"
>>  #include "qapi/qmp/qerror.h"
>> -#include "migration/migration.h"
>>  #include "sysemu/block-backend.h"
>>  
>>  static const AIOCBInfo qed_aiocb_info = {
>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>> index dd792a8..76b08f8 100644
>> --- a/hw/i386/pc_q35.c
>> +++ b/hw/i386/pc_q35.c
>> @@ -46,7 +46,6 @@
>>  #include "hw/ide/ahci.h"
>>  #include "hw/usb.h"
>>  #include "qemu/error-report.h"
>> -#include "migration/migration.h"
>>  
>>  /* ICH9 AHCI has 6 ports */
>>  #define MAX_SATA_PORTS     6
>> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
>> index 9334a8a..ebc8ccf 100644
>> --- a/hw/virtio/vhost-user.c
>> +++ b/hw/virtio/vhost-user.c
>> @@ -17,7 +17,6 @@
>>  #include "sysemu/kvm.h"
>>  #include "qemu/error-report.h"
>>  #include "qemu/sockets.h"
>> -#include "migration/migration.h"
>>  
>>  #include <sys/ioctl.h>
>>  #include <sys/socket.h>
>> diff --git a/hw/virtio/vhost-vsock.c b/hw/virtio/vhost-vsock.c
>> index b481562..49e0022 100644
>> --- a/hw/virtio/vhost-vsock.c
>> +++ b/hw/virtio/vhost-vsock.c
>> @@ -17,7 +17,6 @@
>>  #include "qapi/error.h"
>>  #include "hw/virtio/virtio-bus.h"
>>  #include "hw/virtio/virtio-access.h"
>> -#include "migration/migration.h"
>>  #include "qemu/error-report.h"
>>  #include "hw/virtio/vhost-vsock.h"
>>  #include "qemu/iov.h"
>
> Aren't these including it to get vmstate macros?
> but have they picked up that instead somewhere?

hw/hw.h

hw/virtio/vhost-vsock.h -> hw/virtio/virtio.h -> hw/hw.h

Dropping vmstate.h from that file would have mean have to add one
hundred new includes or so.  And I didn't see any good reason for that.

My understanding is that all devices end including hw/hw.h one way or
another, so the only reason to add migration include files right now is:
- you use old registartion functions
- you use blockers
- you use migration notifiers

Otherwise, if you just use vmstate macros, they are there by hw/hw.h.

Later, Juan.

      reply	other threads:[~2017-05-15 11:11 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 16:00 [Qemu-devel] [PATCH v3 00/12] Migration mini-cleanup Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 01/12] migration: Create migration/xbzrle.h Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 02/12] migration: Split migration/channel.c for channel operations Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 03/12] migration: Export qemu-file-channel.c functions in its own file Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 04/12] migration: Remove migration.h from colo.h Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 05/12] migration: Move colo.h to migration/ Juan Quintela
2017-05-12 17:51   ` Dr. David Alan Gilbert
2017-05-15 11:04     ` Juan Quintela
2017-05-15 12:44       ` Hailiang Zhang
2017-05-12 16:00 ` [Qemu-devel] [PATCH 06/12] migration: Move failover.h to migration/colo-failover.h Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 07/12] migration: Move page_cache.c to migration/ Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 08/12] migration: Move qjson.h " Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 09/12] migration: Split vmstate-types.c from vmstate.c Juan Quintela
2017-05-12 17:54   ` Dr. David Alan Gilbert
2017-05-15 11:05     ` Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 10/12] migration: Remove qemu-file.h from vmstate.h Juan Quintela
2017-05-12 16:00 ` [Qemu-devel] [PATCH 11/12] migration: Remove vmstate.h from migration.h Juan Quintela
2017-05-13 21:09   ` Philippe Mathieu-Daudé
2017-05-12 16:00 ` [Qemu-devel] [PATCH 12/12] migration: migration.h was not needed Juan Quintela
2017-05-12 17:58   ` Dr. David Alan Gilbert
2017-05-15 11:10     ` Juan Quintela [this message]

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=878tlyfk8s.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).