Skip to content

Commit

Permalink
Use #include "..." for our own headers, <...> for others
Browse files Browse the repository at this point in the history
Tracked down with an ugly, brittle and probably buggy Perl script.

Also move includes converted to <...> up so they get included before
ours where that's obviously okay.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
  • Loading branch information
Markus Armbruster committed Jul 12, 2016
1 parent b35399b commit a9c9427
Show file tree
Hide file tree
Showing 91 changed files with 169 additions and 172 deletions.
1 change: 0 additions & 1 deletion block/iscsi.c
Expand Up @@ -46,7 +46,6 @@

#ifdef __linux__
#include <scsi/sg.h>
#include <block/scsi.h>
#endif

typedef struct IscsiLun {
Expand Down
2 changes: 1 addition & 1 deletion crypto/hash-gcrypt.c
Expand Up @@ -19,9 +19,9 @@
*/

#include "qemu/osdep.h"
#include <gcrypt.h>
#include "qapi/error.h"
#include "crypto/hash.h"
#include "gcrypt.h"


static int qcrypto_hash_alg_map[QCRYPTO_HASH_ALG__MAX] = {
Expand Down
2 changes: 1 addition & 1 deletion crypto/pbkdf-gcrypt.c
Expand Up @@ -19,9 +19,9 @@
*/

#include "qemu/osdep.h"
#include <gcrypt.h>
#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "gcrypt.h"

bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash)
{
Expand Down
2 changes: 1 addition & 1 deletion crypto/pbkdf-nettle.c
Expand Up @@ -19,9 +19,9 @@
*/

#include "qemu/osdep.h"
#include <nettle/pbkdf2.h>
#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "nettle/pbkdf2.h"


bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash)
Expand Down
2 changes: 1 addition & 1 deletion exec.c
Expand Up @@ -36,7 +36,7 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#if defined(CONFIG_USER_ONLY)
#include <qemu.h>
#include "qemu.h"
#else /* !CONFIG_USER_ONLY */
#include "hw/hw.h"
#include "exec/memory.h"
Expand Down
8 changes: 4 additions & 4 deletions hw/block/nvme.c
Expand Up @@ -21,10 +21,10 @@
*/

#include "qemu/osdep.h"
#include <hw/block/block.h>
#include <hw/hw.h>
#include <hw/pci/msix.h>
#include <hw/pci/pci.h>
#include "hw/block/block.h"
#include "hw/hw.h"
#include "hw/pci/msix.h"
#include "hw/pci/pci.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/char/sclpconsole.c
Expand Up @@ -13,7 +13,7 @@
*/

#include "qemu/osdep.h"
#include <hw/qdev.h>
#include "hw/qdev.h"
#include "qemu/thread.h"
#include "qemu/error-report.h"

Expand Down
2 changes: 1 addition & 1 deletion hw/display/vga_int.h
Expand Up @@ -24,7 +24,7 @@
#ifndef HW_VGA_INT_H
#define HW_VGA_INT_H 1

#include <hw/hw.h>
#include "hw/hw.h"
#include "exec/memory.h"

#define ST01_V_RETRACE 0x08
Expand Down
2 changes: 1 addition & 1 deletion hw/display/virtio-gpu-3d.c
Expand Up @@ -21,7 +21,7 @@

#ifdef CONFIG_VIRGL

#include "virglrenderer.h"
#include <virglrenderer.h>

static struct virgl_renderer_callbacks virtio_gpu_3d_cbs;

Expand Down
2 changes: 1 addition & 1 deletion hw/display/virtio-gpu.c
Expand Up @@ -28,7 +28,7 @@ static struct virtio_gpu_simple_resource*
virtio_gpu_find_resource(VirtIOGPU *g, uint32_t resource_id);

#ifdef CONFIG_VIRGL
#include "virglrenderer.h"
#include <virglrenderer.h>
#define VIRGL(_g, _virgl, _simple, ...) \
do { \
if (_g->use_virgl_renderer) { \
Expand Down
3 changes: 2 additions & 1 deletion hw/i386/kvm/i8254.c
Expand Up @@ -22,14 +22,15 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#include "qemu/osdep.h"
#include <linux/kvm.h>
#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "hw/timer/i8254.h"
#include "hw/timer/i8254_internal.h"
#include "sysemu/kvm.h"
#include "linux/kvm.h"

#define KVM_PIT_REINJECT_BIT 0

Expand Down
3 changes: 2 additions & 1 deletion hw/i386/kvm/pci-assign.c
Expand Up @@ -20,7 +20,9 @@
* Copyright (C) 2008, Red Hat, Amit Shah (amit.shah@redhat.com)
* Copyright (C) 2008, IBM, Muli Ben-Yehuda (muli@il.ibm.com)
*/

#include "qemu/osdep.h"
#include <linux/kvm.h>
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
Expand All @@ -32,7 +34,6 @@
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
#include "linux/kvm.h"
#include "kvm_i386.h"
#include "hw/pci/pci-assign.h"

Expand Down
14 changes: 7 additions & 7 deletions hw/ide/ahci.c
Expand Up @@ -22,17 +22,17 @@
*/

#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/pci/msi.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"

#include "qemu/error-report.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/internal.h>
#include <hw/ide/pci.h>
#include <hw/ide/ahci.h>
#include "hw/ide/internal.h"
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"

#define DEBUG_AHCI 0

Expand Down
10 changes: 5 additions & 5 deletions hw/ide/cmd646.c
Expand Up @@ -23,15 +23,15 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"

#include <hw/ide/pci.h>
#include "hw/ide/pci.h"

/* CMD646 specific */
#define CFR 0x50
Expand Down
10 changes: 5 additions & 5 deletions hw/ide/core.c
Expand Up @@ -23,10 +23,10 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
Expand All @@ -35,7 +35,7 @@
#include "sysemu/block-backend.h"
#include "qemu/cutils.h"

#include <hw/ide/internal.h>
#include "hw/ide/internal.h"

/* These values were based on a Seagate ST3500418AS but have been modified
to make more sense in QEMU */
Expand Down
14 changes: 7 additions & 7 deletions hw/ide/ich.c
Expand Up @@ -61,15 +61,15 @@
*/

#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/pci/msi.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include <hw/ide/pci.h>
#include <hw/ide/ahci.h>
#include "hw/ide/pci.h"
#include "hw/ide/ahci.h"

#define ICH9_MSI_CAP_OFFSET 0x80
#define ICH9_SATA_CAP_OFFSET 0xA8
Expand Down
8 changes: 4 additions & 4 deletions hw/ide/isa.c
Expand Up @@ -23,13 +23,13 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"

#include <hw/ide/internal.h>
#include "hw/ide/internal.h"

/***********************************************************/
/* ISA IDE definitions */
Expand Down
2 changes: 1 addition & 1 deletion hw/ide/macio.c
Expand Up @@ -29,7 +29,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"

#include <hw/ide/internal.h>
#include "hw/ide/internal.h"

/* debug MACIO */
// #define DEBUG_MACIO
Expand Down
8 changes: 4 additions & 4 deletions hw/ide/microdrive.c
Expand Up @@ -23,13 +23,13 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pcmcia.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pcmcia.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"

#include <hw/ide/internal.h>
#include "hw/ide/internal.h"

#define TYPE_MICRODRIVE "microdrive"
#define MICRODRIVE(obj) OBJECT_CHECK(MicroDriveState, (obj), TYPE_MICRODRIVE)
Expand Down
2 changes: 1 addition & 1 deletion hw/ide/mmio.c
Expand Up @@ -28,7 +28,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"

#include <hw/ide/internal.h>
#include "hw/ide/internal.h"

/***********************************************************/
/* MMIO based ide port
Expand Down
10 changes: 5 additions & 5 deletions hw/ide/pci.c
Expand Up @@ -23,14 +23,14 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/dma.h"
#include "qemu/error-report.h"
#include <hw/ide/pci.h>
#include "hw/ide/pci.h"

#define BMDMA_PAGE_SIZE 4096

Expand Down
10 changes: 5 additions & 5 deletions hw/ide/piix.c
Expand Up @@ -24,15 +24,15 @@
*/

#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"

#include <hw/ide/pci.h>
#include "hw/ide/pci.h"

static uint64_t bmdma_read(void *opaque, hwaddr addr, unsigned size)
{
Expand Down
4 changes: 2 additions & 2 deletions hw/ide/qdev.c
Expand Up @@ -17,11 +17,11 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include "hw/hw.h"
#include "sysemu/dma.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include <hw/ide/internal.h>
#include "hw/ide/internal.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "hw/block/block.h"
Expand Down
10 changes: 5 additions & 5 deletions hw/ide/via.c
Expand Up @@ -24,15 +24,15 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <hw/hw.h>
#include <hw/i386/pc.h>
#include <hw/pci/pci.h>
#include <hw/isa/isa.h>
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/isa/isa.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"

#include <hw/ide/pci.h>
#include "hw/ide/pci.h"

static uint64_t bmdma_read(void *opaque, hwaddr addr,
unsigned size)
Expand Down
2 changes: 1 addition & 1 deletion hw/misc/hyperv_testdev.c
Expand Up @@ -12,11 +12,11 @@
*/

#include "qemu/osdep.h"
#include <linux/kvm.h>
#include "hw/hw.h"
#include "hw/qdev.h"
#include "hw/isa/isa.h"
#include "sysemu/kvm.h"
#include "linux/kvm.h"
#include "target-i386/hyperv.h"
#include "kvm_i386.h"

Expand Down
4 changes: 2 additions & 2 deletions hw/ppc/spapr_cpu_core.c
Expand Up @@ -12,11 +12,11 @@
#include "hw/ppc/spapr.h"
#include "hw/boards.h"
#include "qapi/error.h"
#include <sysemu/cpus.h>
#include "sysemu/cpus.h"
#include "target-ppc/kvm_ppc.h"
#include "hw/ppc/ppc.h"
#include "target-ppc/mmu-hash64.h"
#include <sysemu/numa.h>
#include "sysemu/numa.h"

static void spapr_cpu_reset(void *opaque)
{
Expand Down

0 comments on commit a9c9427

Please sign in to comment.