Patchwork [18/32] qapi: remove qapi/qapi-types-core.h

login
register
mail settings
Submitter Paolo Bonzini
Date Dec. 17, 2012, 6:17 p.m.
Message ID <1355768254-12933-19-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/206982/
State New
Headers show

Comments

Paolo Bonzini - Dec. 17, 2012, 6:17 p.m.
The file is only including error.h and qerror.h.  Prefer explicit
inclusion of whatever files are needed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 qapi/opts-visitor.c         |  1 +
 qapi/qapi-dealloc-visitor.c |  1 +
 qapi/qapi-types-core.h      | 20 --------------------
 qapi/qapi-visit-core.c      |  1 +
 qapi/qapi-visit-core.h      |  2 +-
 qapi/qapi-visit-impl.h      |  2 +-
 qemu-option-internal.h      |  1 +
 qom/object.c                |  1 +
 scripts/qapi-commands.py    |  2 ++
 target-i386/cpu.c           |  1 +
 10 files changed, 10 insertions(+), 22 deletions(-)
 delete mode 100644 qapi/qapi-types-core.h

Patch

diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index e3fd254..6ccb8a1 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -11,6 +11,7 @@ 
  */
 
 #include "qemu-common.h"
+#include "qerror.h"
 #include "opts-visitor.h"
 #include "qemu-queue.h"
 #include "qemu-option-internal.h"
diff --git a/qapi/qapi-dealloc-visitor.c b/qapi/qapi-dealloc-visitor.c
index 75214e7..7c44042 100644
--- a/qapi/qapi-dealloc-visitor.c
+++ b/qapi/qapi-dealloc-visitor.c
@@ -15,6 +15,7 @@ 
 #include "qemu-queue.h"
 #include "qemu-common.h"
 #include "qemu-objects.h"
+#include "qapi-visit-impl.h"
 
 typedef struct StackEntry
 {
diff --git a/qapi/qapi-types-core.h b/qapi/qapi-types-core.h
deleted file mode 100644
index 831df21..0000000
--- a/qapi/qapi-types-core.h
+++ /dev/null
@@ -1,20 +0,0 @@ 
-/*
- * Core Definitions for QAPI-generated Types
- *
- * Copyright IBM, Corp. 2011
- *
- * Authors:
- *  Anthony Liguori   <aliguori@us.ibm.com>
- *
- * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
- * See the COPYING.LIB file in the top-level directory.
- *
- */
-
-#ifndef QAPI_TYPES_CORE_H
-#define QAPI_TYPES_CORE_H
-
-#include "error.h"
-#include "qerror.h"
-
-#endif
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 3002939..4649fb7 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qapi-visit-core.c
@@ -12,6 +12,7 @@ 
  */
 
 #include "qemu-common.h"
+#include "qerror.h"
 #include "qapi/qapi-visit-core.h"
 #include "qapi/qapi-visit-impl.h"
 
diff --git a/qapi/qapi-visit-core.h b/qapi/qapi-visit-core.h
index 60aceda..00ce678 100644
--- a/qapi/qapi-visit-core.h
+++ b/qapi/qapi-visit-core.h
@@ -13,7 +13,7 @@ 
 #ifndef QAPI_VISITOR_CORE_H
 #define QAPI_VISITOR_CORE_H
 
-#include "qapi/qapi-types-core.h"
+#include "error.h"
 #include <stdlib.h>
 
 typedef struct GenericList
diff --git a/qapi/qapi-visit-impl.h b/qapi/qapi-visit-impl.h
index 0f3a189..efd4271 100644
--- a/qapi/qapi-visit-impl.h
+++ b/qapi/qapi-visit-impl.h
@@ -12,7 +12,7 @@ 
 #ifndef QAPI_VISITOR_IMPL_H
 #define QAPI_VISITOR_IMPL_H
 
-#include "qapi/qapi-types-core.h"
+#include "error.h"
 #include "qapi/qapi-visit-core.h"
 
 void input_type_enum(Visitor *v, int *obj, const char *strings[],
diff --git a/qemu-option-internal.h b/qemu-option-internal.h
index 19fdc1c..77899b0 100644
--- a/qemu-option-internal.h
+++ b/qemu-option-internal.h
@@ -27,6 +27,7 @@ 
 #define QEMU_OPTIONS_INTERNAL_H
 
 #include "qemu-option.h"
+#include "qemu-error.h"
 
 struct QemuOpt {
     const char   *name;
diff --git a/qom/object.c b/qom/object.c
index 0739aa2..8d3036d 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -15,6 +15,7 @@ 
 #include "qapi/qapi-visit-core.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-output-visitor.h"
+#include "qerror.h"
 
 /* TODO: replace QObject with a simpler visitor to avoid a dependency
  * of the QOM core on QObject?  */
diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py
index 2db0bf1..5d034c2 100644
--- a/scripts/qapi-commands.py
+++ b/scripts/qapi-commands.py
@@ -367,6 +367,8 @@  def gen_command_def_prologue(prefix="", proxy=False):
  */
 
 #include "qemu-common.h"
+#include "module.h"
+#include "qerror.h"
 #include "qemu-objects.h"
 #include "qapi/qmp-core.h"
 #include "qapi/qapi-visit-core.h"
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 7be3ad8..e968006 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -26,6 +26,7 @@ 
 
 #include "qemu-option.h"
 #include "qemu-config.h"
+#include "qerror.h"
 
 #include "qapi/qapi-visit-core.h"
 #include "arch_init.h"