[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes |
Date: |
Fri, 10 Aug 2018 12:01:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
"Michael S. Tsirkin" <address@hidden> wrote:
> On Fri, Aug 10, 2018 at 09:34:32AM +0200, Juan Quintela wrote:
>> "Michael S. Tsirkin" <address@hidden> wrote:
>> > On Thu, Aug 09, 2018 at 08:03:03PM +0100, Dr. David Alan Gilbert wrote:
>> >> * Juan Quintela (address@hidden) wrote:
>> >> > They are all already included in virtio_pci.h.
>> >
>> > All I see in virtio_pci.h is:
>> >
>> > #include "standard-headers/linux/types.h"
>> >
>> > Weird.
>> >
>> > BTW what's the point of this patch? Generally it's best not to depend
>> > on headers including each other, it makes refactoring harder.
>>
>> If you see the following patches, we remove blk, net, serial, scsi,
>> balloon and input bits from that file, so I was removing includes patch
>> by patch.
>>
>> And at the end, I found that we only need that ones.
>>
>> "virtio-pci.h" does too many things here, I could have split it also,
>> because the mayority of the bits are only used now inside their own
>> virtio-foo-pci.c. But then, there are things that share bits,
>> virtio-bus-pci is used for lots of stuff, virtio-input-pci bits are used
>> in virtio-input-host-pci.c, etc, So I decided to only do the direct
>> split.
>>
>> And about including directly all the files that you use, and including
>> only the files that are extrictly needed, the normal argument is that
>> the less includes, the faster compiler times.
>>
>> Later, Juan.
>
> That's reverse of the direction we have been going.
> Pls move includes when you split up the files.
Hi
You want this bit of virtio-pci.h into vhost-vsock-pci.h?
#ifdef CONFIG_VHOST_VSOCK
/*
* vhost-vsock-pci: This extends VirtioPCIProxy.
*/
#define TYPE_VHOST_VSOCK_PCI "vhost-vsock-pci"
#define VHOST_VSOCK_PCI(obj) \
OBJECT_CHECK(VHostVSockPCI, (obj), TYPE_VHOST_VSOCK_PCI)
struct VHostVSockPCI {
VirtIOPCIProxy parent_obj;
VHostVSock vdev;
};
#endif
Except for shared things (input, bus, ...) the rest are only used on
the file that uses them.
Later, Juan.
- Re: [Qemu-devel] [PATCH v2 05/22] check: Only test usb-xhci-nec when it is compiled in, (continued)
- [Qemu-devel] [PATCH v2 06/22] i386-softmmu: Configuration is identical to x86_64-softmmu, Juan Quintela, 2018/08/08
- [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Juan Quintela, 2018/08/08
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Thomas Huth, 2018/08/08
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Dr. David Alan Gilbert, 2018/08/09
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Michael S. Tsirkin, 2018/08/09
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Juan Quintela, 2018/08/10
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Michael S. Tsirkin, 2018/08/10
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes,
Juan Quintela <=
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Michael S. Tsirkin, 2018/08/10
- Re: [Qemu-devel] [PATCH v2 09/22] virtio: Remove unneeded includes, Juan Quintela, 2018/08/10
[Qemu-devel] [PATCH v2 10/22] virtio: split vsock bits from virtio-pci, Juan Quintela, 2018/08/08
[Qemu-devel] [PATCH v2 11/22] virtio: split host bits from virtio-pci, Juan Quintela, 2018/08/08
[Qemu-devel] [PATCH v2 08/22] check: Only test tpm devices when they are compiled in, Juan Quintela, 2018/08/08