]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
Normalize position of header guard
authorMarkus Armbruster <armbru@redhat.com>
Tue, 4 Jun 2019 18:16:15 +0000 (20:16 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 12 Jun 2019 11:20:20 +0000 (13:20 +0200)
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]

13 files changed:
crypto/ivgen-essiv.h
crypto/ivgen-plain.h
crypto/ivgen-plain64.h
include/hw/arm/allwinner-a10.h
include/hw/arm/omap.h
include/hw/arm/xlnx-zynqmp.h
include/hw/char/cadence_uart.h
include/hw/display/xlnx_dp.h
include/hw/dma/xlnx-zynq-devcfg.h
include/hw/net/cadence_gem.h
target/i386/whp-dispatch.h
target/tilegx/spr_def_64.h
tests/io-channel-helpers.h

index f34dbab57b8dbffc82a408abf96984e871a6729d..6c35c0b5abd5447791bc1fb7bc1c831af39b7ab1 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
  */
 
-#include "ivgenpriv.h"
+#ifndef QCRYPTO_IVGEN_ESSIV_H
+#define QCRYPTO_IVGEN_ESSIV_H
 
-#ifndef QCRYPTO_IVGEN_ESSIV_H__
-#define QCRYPTO_IVGEN_ESSIV_H__
+#include "ivgenpriv.h"
 
 extern struct QCryptoIVGenDriver qcrypto_ivgen_essiv;
 
-#endif /* QCRYPTO_IVGEN_ESSIV_H__ */
+#endif /* QCRYPTO_IVGEN_ESSIV_H */
index 16e1ae5b27d472cba00f23f77ce04a18d28ed107..395501f6934c6c38441dd258089e2c658dbeefee 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
  */
 
-#include "ivgenpriv.h"
-
 #ifndef QCRYPTO_IVGEN_PLAIN_H__
 #define QCRYPTO_IVGEN_PLAIN_H__
 
+#include "ivgenpriv.h"
+
 extern struct QCryptoIVGenDriver qcrypto_ivgen_plain;
 
 #endif /* QCRYPTO_IVGEN_PLAIN_H__ */
index f8611bd705ffaa3d8f91304fffb41f1539906a7b..0a20fd1fd84b3c648922be4f33785f4af7deb965 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
  */
 
-#include "ivgenpriv.h"
+#ifndef QCRYPTO_IVGEN_PLAIN64_H
+#define QCRYPTO_IVGEN_PLAIN64_H
 
-#ifndef QCRYPTO_IVGEN_PLAIN64_H__
-#define QCRYPTO_IVGEN_PLAIN64_H__
+#include "ivgenpriv.h"
 
 extern struct QCryptoIVGenDriver qcrypto_ivgen_plain64;
 
-#endif /* QCRYPTO_IVGEN_PLAIN64_H__ */
+#endif /* QCRYPTO_IVGEN_PLAIN64_H */
index bbfbaf01c76b844d824d79e5f9fc638d9f5186a2..e99fe2ea2efa8732547d1154df0b2db72b3e5086 100644 (file)
@@ -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
index 9de867daa46b78cc0454c1bc8daa073b6077cf3e..d21e4182421ed5c49c8612cb507f238b67658bdd 100644 (file)
  * 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
index 1b17f13b0bb92c24809445a91357968258c768b9..35804ea80a22ffc147d41c8b42a5595b4f078a12 100644 (file)
@@ -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
index 118e3f10de6a202a046c0bc27db3e9d9ff17fa7f..e1cf33e94cccd0cd63f98fc524fbdb3c24147170 100644 (file)
@@ -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
index 45a805033a534c503799c22ff552620d2d53abc4..ab0dd250cc5bbcab5bb6b97c5c0645171c6be45b 100644 (file)
  *
  * 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
index 9f5119a89a37bfe0983f00932710f1fce100fc6d..1d3969d91fa92a22cd9fe086e5474fc6b013a4bc 100644 (file)
@@ -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
index 5426961d91bd2f4509c4c13fb45fb8359f23740c..5c83036ade1c13663375a23e19c1f9462ade7042 100644 (file)
@@ -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
index a23fb33a298434f3781bddf0f7fd24e3ca6851d1..23791fbb47b14a775bae3670b9f71e2b3e6d3b71 100644 (file)
@@ -1,12 +1,11 @@
+#ifndef WHP_DISPATCH_H
+#define WHP_DISPATCH_H
+
 #include <windows.h>
 
 #include <WinHvPlatform.h>
 #include <WinHvEmulation.h>
 
-#ifndef WHP_DISPATCH_H
-#define WHP_DISPATCH_H
-
-
 #define LIST_WINHVPLATFORM_FUNCTIONS(X) \
   X(HRESULT, WHvGetCapability, (WHV_CAPABILITY_CODE CapabilityCode, VOID* CapabilityBuffer, UINT32 CapabilityBufferSizeInBytes, UINT32* WrittenSizeInBytes)) \
   X(HRESULT, WHvCreatePartition, (WHV_PARTITION_HANDLE* Partition)) \
index 67a6c1751e3b68f8b0c5cff6352cdd99dfb13291..d3c0cc26d84a9fa3d16855b929fbeb955a0f91fe 100644 (file)
  *   more details.
  */
 
-#ifndef __DOXYGEN__
-
-#ifndef __ARCH_SPR_DEF_64_H__
-#define __ARCH_SPR_DEF_64_H__
+#ifndef ARCH_SPR_DEF_64_H
+#define ARCH_SPR_DEF_64_H
 
 #define SPR_AUX_PERF_COUNT_0 0x2105
 #define SPR_AUX_PERF_COUNT_1 0x2106
 #define SPR_WATCH_MASK 0x200a
 #define SPR_WATCH_VAL 0x200b
 
-#endif /* !defined(__ARCH_SPR_DEF_64_H__) */
-
-#endif /* !defined(__DOXYGEN__) */
+#endif
index fedc64fd5a060bad75fa2945887db0d4efaf67a9..bb2de6fbb97962863ba01a3642f4cce032f6f5ee 100644 (file)
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- *
  */
 
-#include "io/channel.h"
+#ifndef TEST_IO_CHANNEL_HELPERS_H
+#define TEST_IO_CHANNEL_HELPERS_H
 
-#ifndef TEST_IO_CHANNEL_HELPERS
-#define TEST_IO_CHANNEL_HELPERS
+#include "io/channel.h"
 
 typedef struct QIOChannelTest QIOChannelTest;
 
@@ -39,4 +38,4 @@ void qio_channel_test_run_reader(QIOChannelTest *test,
 
 void qio_channel_test_validate(QIOChannelTest *test);
 
-#endif /* TEST_IO_CHANNEL_HELPERS */
+#endif /* TEST_IO_CHANNEL_HELPERS_H */