Browse Source

Clean up header guards that don't match their file name

Header guard symbols should match their file name to make guard
collisions less likely.

Cleaned up with scripts/clean-header-guards.pl, followed by some
renaming of new guard symbols picked by the script to better ones.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <2019031514.28030-6-armbru@redhat.com>
[Rebase to master: update include/hw/net/ne2000-isa.h]
master
Markus Armbruster 3 months ago
parent
commit
58ea30f514

+ 3
- 3
contrib/elf2dmp/qemu_elf.h View File

@@ -5,8 +5,8 @@
5 5
  *
6 6
  */
7 7
 
8
-#ifndef ELF2DMP_ELF_H
9
-#define ELF2DMP_ELF_H
8
+#ifndef EMPF2DMP_QEMU_ELF_H
9
+#define EMPF2DMP_QEMU_ELF_H
10 10
 
11 11
 #include "elf.h"
12 12
 
@@ -47,4 +47,4 @@ void QEMU_Elf_exit(QEMU_Elf *qe);
47 47
 Elf64_Phdr *elf64_getphdr(void *map);
48 48
 Elf64_Half elf_getphdrnum(void *map);
49 49
 
50
-#endif /* ELF2DMP_ELF_H */
50
+#endif /* ELF2DMP_QEMU_ELF_H */

+ 2
- 2
disas/nanomips.h View File

@@ -20,8 +20,8 @@
20 20
  *
21 21
  */
22 22
 
23
-#ifndef NANOMIPS_DISASSEMBLER_H
24
-#define NANOMIPS_DISASSEMBLER_H
23
+#ifndef DISAS_NANOMIPS_H
24
+#define DISAS_NANOMIPS_H
25 25
 
26 26
 #include <string>
27 27
 

+ 4
- 3
fsdev/qemu-fsdev-throttle.h View File

@@ -12,8 +12,8 @@
12 12
  *
13 13
  */
14 14
 
15
-#ifndef _FSDEV_THROTTLE_H
16
-#define _FSDEV_THROTTLE_H
15
+#ifndef QEMU_FSDEV_THROTTLE_H
16
+#define QEMU_FSDEV_THROTTLE_H
17 17
 
18 18
 #include "block/aio.h"
19 19
 #include "qemu/main-loop.h"
@@ -35,4 +35,5 @@ void coroutine_fn fsdev_co_throttle_request(FsThrottle *, bool ,
35 35
                                             struct iovec *, int);
36 36
 
37 37
 void fsdev_throttle_cleanup(FsThrottle *);
38
-#endif /* _FSDEV_THROTTLE_H */
38
+
39
+#endif /* QEMU_FSDEV_THROTTLE_H */

+ 2
- 2
hw/arm/smmuv3-internal.h View File

@@ -18,8 +18,8 @@
18 18
  * with this program; if not, see <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 
21
-#ifndef HW_ARM_SMMU_V3_INTERNAL_H
22
-#define HW_ARM_SMMU_V3_INTERNAL_H
21
+#ifndef HW_ARM_SMMUV3_INTERNAL_H
22
+#define HW_ARM_SMMUV3_INTERNAL_H
23 23
 
24 24
 #include "hw/arm/smmu-common.h"
25 25
 

+ 3
- 3
hw/display/vga_regs.h View File

@@ -14,8 +14,8 @@
14 14
  *
15 15
  */
16 16
 
17
-#ifndef LINUX_VIDEO_VGA_H
18
-#define LINUX_VIDEO_VGA_H
17
+#ifndef HW_VGA_REGS_H
18
+#define HW_VGA_REGS_H
19 19
 
20 20
 /* Some of the code below is taken from SVGAlib.  The original,
21 21
    unmodified copyright notice for that code is below. */
@@ -156,4 +156,4 @@
156 156
 /* VGA graphics controller bit masks */
157 157
 #define VGA_GR06_GRAPHICS_MODE  0x01
158 158
 
159
-#endif /* LINUX_VIDEO_VGA_H */
159
+#endif /* HW_VGA_REGS_H */

+ 2
- 2
hw/rdma/vmw/pvrdma_qp_ops.h View File

@@ -13,8 +13,8 @@
13 13
  *
14 14
  */
15 15
 
16
-#ifndef PVRDMA_QP_H
17
-#define PVRDMA_QP_H
16
+#ifndef PVRDMA_QP_OPS_H
17
+#define PVRDMA_QP_OPS_H
18 18
 
19 19
 #include "pvrdma.h"
20 20
 

+ 3
- 2
hw/sd/sdmmc-internal.h View File

@@ -7,8 +7,9 @@
7 7
  * See the COPYING file in the top-level directory.
8 8
  * SPDX-License-Identifier: GPL-2.0-or-later
9 9
  */
10
-#ifndef SD_INTERNAL_H
11
-#define SD_INTERNAL_H
10
+
11
+#ifndef SDMMC_INTERNAL_H
12
+#define SDMMC_INTERNAL_H
12 13
 
13 14
 #define SDMMC_CMD_MAX 64
14 15
 

+ 3
- 5
include/authz/listfile.h View File

@@ -18,8 +18,8 @@
18 18
  *
19 19
  */
20 20
 
21
-#ifndef QAUTHZ_LIST_FILE_H__
22
-#define QAUTHZ_LIST_FILE_H__
21
+#ifndef QAUTHZ_LISTFILE_H
22
+#define QAUTHZ_LISTFILE_H
23 23
 
24 24
 #include "authz/list.h"
25 25
 #include "qapi/qapi-types-authz.h"
@@ -106,6 +106,4 @@ QAuthZListFile *qauthz_list_file_new(const char *id,
106 106
                                      bool refresh,
107 107
                                      Error **errp);
108 108
 
109
-
110
-#endif /* QAUTHZ_LIST_FILE_H__ */
111
-
109
+#endif /* QAUTHZ_LISTFILE_H */

+ 3
- 4
include/authz/pamacct.h View File

@@ -18,8 +18,8 @@
18 18
  *
19 19
  */
20 20
 
21
-#ifndef QAUTHZ_PAM_H__
22
-#define QAUTHZ_PAM_H__
21
+#ifndef QAUTHZ_PAMACCT_H
22
+#define QAUTHZ_PAMACCT_H
23 23
 
24 24
 #include "authz/base.h"
25 25
 
@@ -96,5 +96,4 @@ QAuthZPAM *qauthz_pam_new(const char *id,
96 96
                           const char *service,
97 97
                           Error **errp);
98 98
 
99
-
100
-#endif /* QAUTHZ_PAM_H__ */
99
+#endif /* QAUTHZ_PAMACCT_H */

+ 2
- 2
include/hw/audio/soundhw.h View File

@@ -1,5 +1,5 @@
1
-#ifndef HW_AUDIO_H
2
-#define HW_AUDIO_H
1
+#ifndef HW_SOUNDHW_H
2
+#define HW_SOUNDHW_H
3 3
 
4 4
 void isa_register_soundhw(const char *name, const char *descr,
5 5
                           int (*init_isa)(ISABus *bus));

+ 2
- 2
include/hw/i386/x86-iommu.h View File

@@ -17,8 +17,8 @@
17 17
  * with this program; if not, see <http://www.gnu.org/licenses/>.
18 18
  */
19 19
 
20
-#ifndef IOMMU_COMMON_H
21
-#define IOMMU_COMMON_H
20
+#ifndef HW_I386_X86_IOMMU_H
21
+#define HW_I386_X86_IOMMU_H
22 22
 
23 23
 #include "hw/sysbus.h"
24 24
 #include "hw/pci/pci.h"

+ 3
- 3
include/hw/intc/heathrow_pic.h View File

@@ -23,8 +23,8 @@
23 23
  * THE SOFTWARE.
24 24
  */
25 25
 
26
-#ifndef HEATHROW_H
27
-#define HEATHROW_H
26
+#ifndef HW_INTC_HEATHROW_PIC_H
27
+#define HW_INTC_HEATHROW_PIC_H
28 28
 
29 29
 #define TYPE_HEATHROW "heathrow"
30 30
 #define HEATHROW(obj) OBJECT_CHECK(HeathrowState, (obj), TYPE_HEATHROW)
@@ -46,4 +46,4 @@ typedef struct HeathrowState {
46 46
 
47 47
 #define HEATHROW_NUM_IRQS 64
48 48
 
49
-#endif /* HEATHROW_H */
49
+#endif /* HW_INTC_HEATHROW_PIC_H */

+ 3
- 3
include/hw/intc/xlnx-pmu-iomod-intc.h View File

@@ -22,8 +22,8 @@
22 22
  * THE SOFTWARE.
23 23
  */
24 24
 
25
-#ifndef XLNX_PMU_IO_INTC_H
26
-#define XLNX_PMU_IO_INTC_H
25
+#ifndef HW_INTC_XLNX_PMU_IOMOD_INTC_H
26
+#define HW_INTC_XLNX_PMU_IOMOD_INTC_H
27 27
 
28 28
 #include "hw/sysbus.h"
29 29
 #include "hw/register.h"
@@ -54,4 +54,4 @@ typedef struct XlnxPMUIOIntc {
54 54
     RegisterInfo regs_info[XLNXPMUIOINTC_R_MAX];
55 55
 } XlnxPMUIOIntc;
56 56
 
57
-#endif /* XLNX_PMU_IO_INTC_H */
57
+#endif /* HW_INTC_XLNX_PMU_IOMOD_INTC_H */

+ 2
- 2
include/hw/misc/armsse-mhu.h View File

@@ -20,8 +20,8 @@
20 20
  *  + sysbus IRQ 1: interrupt for CPU 1
21 21
  */
22 22
 
23
-#ifndef HW_MISC_SSE_MHU_H
24
-#define HW_MISC_SSE_MHU_H
23
+#ifndef HW_MISC_ARMSSE_MHU_H
24
+#define HW_MISC_ARMSSE_MHU_H
25 25
 
26 26
 #include "hw/sysbus.h"
27 27
 

+ 2
- 2
include/hw/net/ne2000-isa.h View File

@@ -7,8 +7,8 @@
7 7
  * See the COPYING file in the top-level directory.
8 8
  */
9 9
 
10
-#ifndef HW_NET_NE2K_ISA_H
11
-#define HW_NET_NE2K_ISA_H
10
+#ifndef HW_NET_NE2000_ISA_H
11
+#define HW_NET_NE2000_ISA_H
12 12
 
13 13
 #include "hw/hw.h"
14 14
 #include "hw/qdev.h"

+ 2
- 2
include/hw/pci-host/sabre.h View File

@@ -1,5 +1,5 @@
1
-#ifndef PCI_HOST_APB_H
2
-#define PCI_HOST_APB_H
1
+#ifndef HW_PCI_HOST_SABRE_H
2
+#define HW_PCI_HOST_SABRE_H
3 3
 
4 4
 #include "hw/sparc/sun4u_iommu.h"
5 5
 

+ 4
- 3
include/hw/watchdog/wdt_aspeed.h View File

@@ -6,8 +6,9 @@
6 6
  * This code is licensed under the GPL version 2 or later. See the
7 7
  * COPYING file in the top-level directory.
8 8
  */
9
-#ifndef ASPEED_WDT_H
10
-#define ASPEED_WDT_H
9
+
10
+#ifndef WDT_ASPEED_H
11
+#define WDT_ASPEED_H
11 12
 
12 13
 #include "hw/sysbus.h"
13 14
 
@@ -31,4 +32,4 @@ typedef struct AspeedWDTState {
31 32
     uint32_t ext_pulse_width_mask;
32 33
 } AspeedWDTState;
33 34
 
34
-#endif  /* ASPEED_WDT_H */
35
+#endif /* WDT_ASPEED_H */

+ 3
- 3
include/hw/xen/xen-legacy-backend.h View File

@@ -1,5 +1,5 @@
1
-#ifndef QEMU_HW_XEN_BACKEND_H
2
-#define QEMU_HW_XEN_BACKEND_H
1
+#ifndef HW_XEN_LEGACY_BACKEND_H
2
+#define HW_XEN_LEGACY_BACKEND_H
3 3
 
4 4
 #include "hw/xen/xen_common.h"
5 5
 #include "hw/xen/xen_pvdev.h"
@@ -101,4 +101,4 @@ int xen_config_dev_vfb(int vdev, const char *type);
101 101
 int xen_config_dev_vkbd(int vdev);
102 102
 int xen_config_dev_console(int vdev);
103 103
 
104
-#endif /* QEMU_HW_XEN_BACKEND_H */
104
+#endif /* HW_XEN_LEGACY_BACKEND_H */

+ 3
- 3
include/hw/xtensa/xtensa-isa.h View File

@@ -22,8 +22,8 @@
22 22
  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23
  */
24 24
 
25
-#ifndef XTENSA_LIBISA_H
26
-#define XTENSA_LIBISA_H
25
+#ifndef HW_XTENSA_XTENSA_ISA_H
26
+#define HW_XTENSA_XTENSA_ISA_H
27 27
 
28 28
 #ifdef __cplusplus
29 29
 extern "C" {
@@ -833,4 +833,4 @@ int xtensa_funcUnit_num_copies(xtensa_isa isa, xtensa_funcUnit fun);
833 833
 #ifdef __cplusplus
834 834
 }
835 835
 #endif
836
-#endif /* XTENSA_LIBISA_H */
836
+#endif /* HW_XTENSA_XTENSA_ISA_H */

+ 2
- 2
include/migration/qemu-file-types.h View File

@@ -22,8 +22,8 @@
22 22
  * THE SOFTWARE.
23 23
  */
24 24
 
25
-#ifndef QEMU_FILE_H
26
-#define QEMU_FILE_H
25
+#ifndef MIGRATION_QEMU_FILE_TYPES_H
26
+#define MIGRATION_QEMU_FILE_TYPES_H
27 27
 
28 28
 int qemu_file_get_error(QEMUFile *f);
29 29
 

+ 3
- 3
include/qemu/filemonitor.h View File

@@ -18,8 +18,8 @@
18 18
  *
19 19
  */
20 20
 
21
-#ifndef QEMU_FILE_MONITOR_H
22
-#define QEMU_FILE_MONITOR_H
21
+#ifndef QEMU_FILEMONITOR_H
22
+#define QEMU_FILEMONITOR_H
23 23
 
24 24
 #include "qemu-common.h"
25 25
 
@@ -125,4 +125,4 @@ void qemu_file_monitor_remove_watch(QFileMonitor *mon,
125 125
                                     const char *dirpath,
126 126
                                     int64_t id);
127 127
 
128
-#endif /* QEMU_FILE_MONITOR_H */
128
+#endif /* QEMU_FILEMONITOR_H */

+ 2
- 2
include/scsi/constants.h View File

@@ -20,8 +20,8 @@
20 20
  * the scsi code for linux.
21 21
  */
22 22
 
23
-#ifndef BLOCK_SCSI_H
24
-#define BLOCK_SCSI_H
23
+#ifndef SCSI_CONSTANTS_H
24
+#define SCSI_CONSTANTS_H
25 25
 
26 26
 /*
27 27
  *      SCSI opcodes

+ 3
- 3
net/colo.h View File

@@ -12,8 +12,8 @@
12 12
  * later.  See the COPYING file in the top-level directory.
13 13
  */
14 14
 
15
-#ifndef QEMU_COLO_PROXY_H
16
-#define QEMU_COLO_PROXY_H
15
+#ifndef NET_COLO_H
16
+#define NET_COLO_H
17 17
 
18 18
 #include "qemu/jhash.h"
19 19
 #include "qemu/timer.h"
@@ -103,4 +103,4 @@ void connection_hashtable_reset(GHashTable *connection_track_table);
103 103
 Packet *packet_new(const void *data, int size, int vnet_hdr_len);
104 104
 void packet_destroy(void *opaque, void *user_data);
105 105
 
106
-#endif /* QEMU_COLO_PROXY_H */
106
+#endif /* NET_COLO_H */

+ 3
- 3
target/i386/hax-posix.h View File

@@ -12,8 +12,8 @@
12 12
  *
13 13
  */
14 14
 
15
-#ifndef TARGET_I386_HAX_DARWIN_H
16
-#define TARGET_I386_HAX_DARWIN_H
15
+#ifndef TARGET_I386_HAX_POSIX_H
16
+#define TARGET_I386_HAX_POSIX_H
17 17
 
18 18
 #include <sys/ioctl.h>
19 19
 
@@ -58,4 +58,4 @@ static inline void hax_close_fd(hax_fd fd)
58 58
 #define HAX_VCPU_SET_REGS       _IOWR(0, 0xc7, struct vcpu_state_t)
59 59
 #define HAX_VCPU_GET_REGS       _IOWR(0, 0xc8, struct vcpu_state_t)
60 60
 
61
-#endif /* TARGET_I386_HAX_DARWIN_H */
61
+#endif /* TARGET_I386_HAX_POSIX_H */

+ 4
- 2
target/i386/hvf/x86_task.h View File

@@ -11,8 +11,10 @@
11 11
  * You should have received a copy of the GNU General Public License along
12 12
  * with this program; if not, see <http://www.gnu.org/licenses/>.
13 13
  */
14
-#ifndef HVF_TASK
15
-#define HVF_TASK
14
+
15
+#ifndef HVF_X86_TASK_H
16
+#define HVF_X86_TASK_H
17
+
16 18
 void vmx_handle_task_switch(CPUState *cpu, x68_segment_selector tss_sel,
17 19
         int reason, bool gate_valid, uint8_t gate, uint64_t gate_type);
18 20
 #endif

+ 4
- 3
target/nios2/cpu.h View File

@@ -17,8 +17,9 @@
17 17
  * License along with this library; if not, see
18 18
  * <http://www.gnu.org/licenses/lgpl-2.1.html>
19 19
  */
20
-#ifndef CPU_NIOS2_H
21
-#define CPU_NIOS2_H
20
+
21
+#ifndef NIOS2_CPU_H
22
+#define NIOS2_CPU_H
22 23
 
23 24
 #include "qemu-common.h"
24 25
 
@@ -270,4 +271,4 @@ static inline void cpu_get_tb_cpu_state(CPUNios2State *env, target_ulong *pc,
270 271
     *flags = (env->regs[CR_STATUS] & (CR_STATUS_EH | CR_STATUS_U));
271 272
 }
272 273
 
273
-#endif /* CPU_NIOS2_H */
274
+#endif /* NIOS2_CPU_H */

+ 4
- 3
target/nios2/mmu.h View File

@@ -17,8 +17,9 @@
17 17
  * License along with this library; if not, see
18 18
  * <http://www.gnu.org/licenses/lgpl-2.1.html>
19 19
  */
20
-#ifndef MMU_NIOS2_H
21
-#define MMU_NIOS2_H
20
+
21
+#ifndef NIOS2_MMU_H
22
+#define NIOS2_MMU_H
22 23
 
23 24
 typedef struct Nios2TLBEntry {
24 25
     target_ulong tag;
@@ -47,4 +48,4 @@ void mmu_read_debug(CPUNios2State *env, uint32_t rn);
47 48
 void mmu_write(CPUNios2State *env, uint32_t rn, uint32_t v);
48 49
 void mmu_init(CPUNios2State *env);
49 50
 
50
-#endif /* MMU_NIOS2_H */
51
+#endif /* NIOS2_MMU_H */

+ 3
- 3
target/ppc/mmu-book3s-v3.h View File

@@ -17,8 +17,8 @@
17 17
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
18 18
  */
19 19
 
20
-#ifndef MMU_BOOOK3S_V3_H
21
-#define MMU_BOOOK3S_V3_H
20
+#ifndef PPC_MMU_BOOK3S_V3_H
21
+#define PPC_MMU_BOOK3S_V3_H
22 22
 
23 23
 #include "mmu-hash64.h"
24 24
 
@@ -118,4 +118,4 @@ static inline hwaddr ppc_hash64_hpt_mask(PowerPCCPU *cpu)
118 118
 
119 119
 #endif /* CONFIG_USER_ONLY */
120 120
 
121
-#endif /* MMU_BOOOK3S_V3_H */
121
+#endif /* PPC_MMU_BOOK3S_V3_H */

+ 2
- 2
tests/libqos/qgraph_internal.h View File

@@ -16,8 +16,8 @@
16 16
  * License along with this library; if not, see <http://www.gnu.org/licenses/>
17 17
  */
18 18
 
19
-#ifndef QGRAPH_EXTRA_H
20
-#define QGRAPH_EXTRA_H
19
+#ifndef QGRAPH_INTERNAL_H
20
+#define QGRAPH_INTERNAL_H
21 21
 
22 22
 /* This header is declaring additional helper functions defined in
23 23
  * libqos/qgraph.c

+ 4
- 3
tests/migration/migration-test.h View File

@@ -4,8 +4,9 @@
4 4
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 5
  * See the COPYING file in the top-level directory.
6 6
  */
7
-#ifndef _TEST_MIGRATION_H_
8
-#define _TEST_MIGRATION_H_
7
+
8
+#ifndef MIGRATION_TEST_H
9
+#define MIGRATION_TEST_H
9 10
 
10 11
 /* Common */
11 12
 #define TEST_MEM_PAGE_SIZE 4096
@@ -31,4 +32,4 @@
31 32
  */
32 33
 #define ARM_TEST_MAX_KERNEL_SIZE (512 * 1024)
33 34
 
34
-#endif /* _TEST_MIGRATION_H_ */
35
+#endif /* _MIGRATION_TEST_H */

Loading…
Cancel
Save