aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-06-04 20:16:15 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-06-12 13:20:20 +0200
commit0553d895f98d6ffa7354dee324ff7a65fca3367f (patch)
tree1bd0b187a8e4aa421d7af3e01ca3d18c80a5c2eb /include
parenta8d2532645cf5ce4f75981f81dfe363efc35d05c (diff)
Normalize position of header guard
This is the common header guard idiom: /* * File comment */ #ifndef GUARD_SYMBOL_H #define GUARD_SYMBOL_H ... actual contents ... #endif A few of our headers have some #include before the guard. target/tilegx/spr_def_64.h has #ifndef __DOXYGEN__ outside the guard. A few more have the #define elsewhere. Change them to match the common idiom. For spr_def_64.h, that means dropping #ifndef __DOXYGEN__. While there, rename guard symbols to make scripts/clean-header-guards.pl happy. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190604181618.19980-2-armbru@redhat.com> [Rebased with conflicts resolved automatically]
Diffstat (limited to 'include')
-rw-r--r--include/hw/arm/allwinner-a10.h4
-rw-r--r--include/hw/arm/omap.h8
-rw-r--r--include/hw/arm/xlnx-zynqmp.h2
-rw-r--r--include/hw/char/cadence_uart.h2
-rw-r--r--include/hw/display/xlnx_dp.h9
-rw-r--r--include/hw/dma/xlnx-zynq-devcfg.h2
-rw-r--r--include/hw/net/cadence_gem.h2
7 files changed, 15 insertions, 14 deletions
diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h
index bbfbaf01c7..e99fe2ea2e 100644
--- a/include/hw/arm/allwinner-a10.h
+++ b/include/hw/arm/allwinner-a10.h
@@ -1,4 +1,5 @@
-#ifndef ALLWINNER_H_
+#ifndef HW_ARM_ALLWINNER_A10_H
+#define HW_ARM_ALLWINNER_A10_H
#include "qemu/error-report.h"
#include "hw/char/serial.h"
@@ -37,5 +38,4 @@ typedef struct AwA10State {
MemoryRegion sram_a;
} AwA10State;
-#define ALLWINNER_H_
#endif
diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h
index 9de867daa4..d21e418242 100644
--- a/include/hw/arm/omap.h
+++ b/include/hw/arm/omap.h
@@ -16,9 +16,11 @@
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef hw_omap_h
+
+#ifndef HW_ARM_OMAP_H
+#define HW_ARM_OMAP_H
+
#include "exec/memory.h"
-# define hw_omap_h "omap.h"
#include "hw/irq.h"
#include "hw/input/tsc2xxx.h"
#include "target/arm/cpu-qom.h"
@@ -991,4 +993,4 @@ enum {
# define OMAP_MPUI_REG_MASK 0x000007ff
-#endif /* hw_omap_h */
+#endif
diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h
index 1b17f13b0b..35804ea80a 100644
--- a/include/hw/arm/xlnx-zynqmp.h
+++ b/include/hw/arm/xlnx-zynqmp.h
@@ -16,6 +16,7 @@
*/
#ifndef XLNX_ZYNQMP_H
+#define XLNX_ZYNQMP_H
#include "hw/arm/boot.h"
#include "hw/intc/arm_gic.h"
@@ -113,5 +114,4 @@ typedef struct XlnxZynqMPState {
bool has_rpu;
} XlnxZynqMPState;
-#define XLNX_ZYNQMP_H
#endif
diff --git a/include/hw/char/cadence_uart.h b/include/hw/char/cadence_uart.h
index 118e3f10de..e1cf33e94c 100644
--- a/include/hw/char/cadence_uart.h
+++ b/include/hw/char/cadence_uart.h
@@ -17,6 +17,7 @@
*/
#ifndef CADENCE_UART_H
+#define CADENCE_UART_H
#include "hw/sysbus.h"
#include "chardev/char-fe.h"
@@ -66,5 +67,4 @@ static inline DeviceState *cadence_uart_create(hwaddr addr,
return dev;
}
-#define CADENCE_UART_H
#endif
diff --git a/include/hw/display/xlnx_dp.h b/include/hw/display/xlnx_dp.h
index 45a805033a..ab0dd250cc 100644
--- a/include/hw/display/xlnx_dp.h
+++ b/include/hw/display/xlnx_dp.h
@@ -19,9 +19,11 @@
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
- *
*/
+#ifndef XLNX_DP_H
+#define XLNX_DP_H
+
#include "hw/sysbus.h"
#include "ui/console.h"
#include "hw/misc/auxbus.h"
@@ -33,9 +35,6 @@
#include "hw/dma/xlnx_dpdma.h"
#include "audio/audio.h"
-#ifndef XLNX_DP_H
-#define XLNX_DP_H
-
#define AUD_CHBUF_MAX_DEPTH (32 * KiB)
#define MAX_QEMU_BUFFER_SIZE (4 * KiB)
@@ -107,4 +106,4 @@ typedef struct XlnxDPState {
#define TYPE_XLNX_DP "xlnx.v-dp"
#define XLNX_DP(obj) OBJECT_CHECK(XlnxDPState, (obj), TYPE_XLNX_DP)
-#endif /* !XLNX_DP_H */
+#endif
diff --git a/include/hw/dma/xlnx-zynq-devcfg.h b/include/hw/dma/xlnx-zynq-devcfg.h
index 9f5119a89a..1d3969d91f 100644
--- a/include/hw/dma/xlnx-zynq-devcfg.h
+++ b/include/hw/dma/xlnx-zynq-devcfg.h
@@ -25,6 +25,7 @@
*/
#ifndef XLNX_ZYNQ_DEVCFG_H
+#define XLNX_ZYNQ_DEVCFG_H
#include "hw/register.h"
#include "hw/sysbus.h"
@@ -58,5 +59,4 @@ typedef struct XlnxZynqDevcfg {
RegisterInfo regs_info[XLNX_ZYNQ_DEVCFG_R_MAX];
} XlnxZynqDevcfg;
-#define XLNX_ZYNQ_DEVCFG_H
#endif
diff --git a/include/hw/net/cadence_gem.h b/include/hw/net/cadence_gem.h
index 5426961d91..5c83036ade 100644
--- a/include/hw/net/cadence_gem.h
+++ b/include/hw/net/cadence_gem.h
@@ -23,6 +23,7 @@
*/
#ifndef CADENCE_GEM_H
+#define CADENCE_GEM_H
#define TYPE_CADENCE_GEM "cadence_gem"
#define CADENCE_GEM(obj) OBJECT_CHECK(CadenceGEMState, (obj), TYPE_CADENCE_GEM)
@@ -84,5 +85,4 @@ typedef struct CadenceGEMState {
bool sar_active[4];
} CadenceGEMState;
-#define CADENCE_GEM_H
#endif