Skip to content

Commit

Permalink
Clean up header guards that don't match their file name
Browse files Browse the repository at this point in the history
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: <20220506134911.2856099-2-armbru@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[Change to generated file ebpf/rss.bpf.skeleton.h backed out]
  • Loading branch information
Markus Armbruster committed May 11, 2022
1 parent 178bacb commit 52581c7
Show file tree
Hide file tree
Showing 58 changed files with 148 additions and 151 deletions.
6 changes: 3 additions & 3 deletions accel/tcg/tcg-accel-ops-icount.h
Expand Up @@ -7,13 +7,13 @@
* See the COPYING file in the top-level directory.
*/

#ifndef TCG_CPUS_ICOUNT_H
#define TCG_CPUS_ICOUNT_H
#ifndef TCG_ACCEL_OPS_ICOUNT_H
#define TCG_ACCEL_OPS_ICOUNT_H

void icount_handle_deadline(void);
void icount_prepare_for_run(CPUState *cpu);
void icount_process_data(CPUState *cpu);

void icount_handle_interrupt(CPUState *cpu, int mask);

#endif /* TCG_CPUS_ICOUNT_H */
#endif /* TCG_ACCEL_OPS_ICOUNT_H */
6 changes: 3 additions & 3 deletions accel/tcg/tcg-accel-ops-mttcg.h
Expand Up @@ -7,13 +7,13 @@
* See the COPYING file in the top-level directory.
*/

#ifndef TCG_CPUS_MTTCG_H
#define TCG_CPUS_MTTCG_H
#ifndef TCG_ACCEL_OPS_MTTCG_H
#define TCG_ACCEL_OPS_MTTCG_H

/* kick MTTCG vCPU thread */
void mttcg_kick_vcpu_thread(CPUState *cpu);

/* start an mttcg vCPU thread */
void mttcg_start_vcpu_thread(CPUState *cpu);

#endif /* TCG_CPUS_MTTCG_H */
#endif /* TCG_ACCEL_OPS_MTTCG_H */
6 changes: 3 additions & 3 deletions accel/tcg/tcg-accel-ops-rr.h
Expand Up @@ -7,8 +7,8 @@
* See the COPYING file in the top-level directory.
*/

#ifndef TCG_CPUS_RR_H
#define TCG_CPUS_RR_H
#ifndef TCG_ACCEL_OPS_RR_H
#define TCG_ACCEL_OPS_RR_H

#define TCG_KICK_PERIOD (NANOSECONDS_PER_SECOND / 10)

Expand All @@ -18,4 +18,4 @@ void rr_kick_vcpu_thread(CPUState *unused);
/* start the round robin vcpu thread */
void rr_start_vcpu_thread(CPUState *cpu);

#endif /* TCG_CPUS_RR_H */
#endif /* TCG_ACCEL_OPS_RR_H */
6 changes: 3 additions & 3 deletions accel/tcg/tcg-accel-ops.h
Expand Up @@ -9,8 +9,8 @@
* See the COPYING file in the top-level directory.
*/

#ifndef TCG_CPUS_H
#define TCG_CPUS_H
#ifndef TCG_ACCEL_OPS_H
#define TCG_ACCEL_OPS_H

#include "sysemu/cpus.h"

Expand All @@ -19,4 +19,4 @@ int tcg_cpus_exec(CPUState *cpu);
void tcg_handle_interrupt(CPUState *cpu, int mask);
void tcg_cpu_init_cflags(CPUState *cpu, bool parallel);

#endif /* TCG_CPUS_H */
#endif /* TCG_ACCEL_OPS_H */
6 changes: 3 additions & 3 deletions block/coroutines.h
Expand Up @@ -22,8 +22,8 @@
* THE SOFTWARE.
*/

#ifndef BLOCK_COROUTINES_INT_H
#define BLOCK_COROUTINES_INT_H
#ifndef BLOCK_COROUTINES_H
#define BLOCK_COROUTINES_H

#include "block/block_int.h"

Expand Down Expand Up @@ -129,4 +129,4 @@ blk_do_pdiscard(BlockBackend *blk, int64_t offset, int64_t bytes);

int generated_co_wrapper blk_do_flush(BlockBackend *blk);

#endif /* BLOCK_COROUTINES_INT_H */
#endif /* BLOCK_COROUTINES_H */
6 changes: 3 additions & 3 deletions bsd-user/arm/target_syscall.h
Expand Up @@ -17,8 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _TARGET_ARCH_SYSCALL_H_
#define _TARGET_ARCH_SYSCALL_H_
#ifndef ARM_TARGET_SYSCALL_H
#define ARM_TARGET_SYSCALL_H

struct target_pt_regs {
abi_long uregs[17];
Expand Down Expand Up @@ -52,4 +52,4 @@ struct target_pt_regs {
#define TARGET_HW_MACHINE "arm"
#define TARGET_HW_MACHINE_ARCH "armv7"

#endif /* !_TARGET_ARCH_SYSCALL_H_ */
#endif /* ARM_TARGET_SYSCALL_H */
7 changes: 3 additions & 4 deletions bsd-user/i386/target.h
Expand Up @@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef TARGET_ARCH_H
#define TARGET_ARCH_H
#ifndef TARGET_H
#define TARGET_H

/*
* i386 doesn't 'lump' the registers for 64-bit args.
Expand All @@ -17,5 +17,4 @@ static inline bool regpairs_aligned(void *cpu_env)
return false;
}

#endif /* ! TARGET_ARCH_H */

#endif /* TARGET_H */
6 changes: 3 additions & 3 deletions bsd-user/i386/target_arch_sysarch.h
Expand Up @@ -17,8 +17,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef BSD_USER_ARCH_SYSARCH_H_
#define BSD_USER_ARCH_SYSARCH_H_
#ifndef TARGET_ARCH_SYSARCH_H
#define TARGET_ARCH_SYSARCH_H

#include "target_syscall.h"

Expand Down Expand Up @@ -74,4 +74,4 @@ static inline void do_freebsd_arch_print_sysarch(
TARGET_ABI_FMT_lx ")", name->name, (int)arg1, arg2, arg3, arg4);
}

#endif /* !BSD_USER_ARCH_SYSARCH_H_ */
#endif /* TARGET_ARCH_SYSARCH_H */
6 changes: 3 additions & 3 deletions bsd-user/x86_64/target_arch_sysarch.h
Expand Up @@ -16,8 +16,8 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef BSD_USER_ARCH_SYSARCH_H_
#define BSD_USER_ARCH_SYSARCH_H_
#ifndef TARGET_ARCH_SYSARCH_H
#define TARGET_ARCH_SYSARCH_H

#include "target_syscall.h"

Expand Down Expand Up @@ -73,4 +73,4 @@ static inline void do_freebsd_arch_print_sysarch(
TARGET_ABI_FMT_lx ")", name->name, (int)arg1, arg2, arg3, arg4);
}

#endif /*! BSD_USER_ARCH_SYSARCH_H_ */
#endif /* TARGET_ARCH_SYSARCH_H */
4 changes: 2 additions & 2 deletions hw/i386/e820_memory_layout.h
Expand Up @@ -6,8 +6,8 @@
* SPDX-License-Identifier: MIT
*/

#ifndef HW_I386_E820_H
#define HW_I386_E820_H
#ifndef HW_I386_E820_MEMORY_LAYOUT_H
#define HW_I386_E820_MEMORY_LAYOUT_H

/* e820 types */
#define E820_RAM 1
Expand Down
4 changes: 2 additions & 2 deletions hw/net/can/ctu_can_fd_frame.h
Expand Up @@ -29,8 +29,8 @@

/* This file is autogenerated, DO NOT EDIT! */

#ifndef __CTU_CAN_FD_CAN_FD_FRAME_FORMAT__
#define __CTU_CAN_FD_CAN_FD_FRAME_FORMAT__
#ifndef HW_CAN_CTU_CAN_FD_FRAME_H
#define HW_CAN_CTU_CAN_FD_FRAME_H

/* CAN_Frame_format memory map */
enum ctu_can_fd_can_frame_format {
Expand Down
4 changes: 2 additions & 2 deletions hw/net/can/ctu_can_fd_regs.h
Expand Up @@ -29,8 +29,8 @@

/* This file is autogenerated, DO NOT EDIT! */

#ifndef __CTU_CAN_FD_CAN_FD_REGISTER_MAP__
#define __CTU_CAN_FD_CAN_FD_REGISTER_MAP__
#ifndef HW_CAN_CTU_CAN_FD_REGS_H
#define HW_CAN_CTU_CAN_FD_REGS_H

/* CAN_Registers memory map */
enum ctu_can_fd_can_registers {
Expand Down
6 changes: 3 additions & 3 deletions hw/nvme/nvme.h
Expand Up @@ -15,8 +15,8 @@
* This code is licensed under the GNU GPL v2 or later.
*/

#ifndef HW_NVME_INTERNAL_H
#define HW_NVME_INTERNAL_H
#ifndef HW_NVME_NVME_H
#define HW_NVME_NVME_H

#include "qemu/uuid.h"
#include "hw/pci/pci.h"
Expand Down Expand Up @@ -519,4 +519,4 @@ void nvme_rw_complete_cb(void *opaque, int ret);
uint16_t nvme_map_dptr(NvmeCtrl *n, NvmeSg *sg, size_t len,
NvmeCmd *cmd);

#endif /* HW_NVME_INTERNAL_H */
#endif /* HW_NVME_NVME_H */
4 changes: 2 additions & 2 deletions hw/usb/hcd-dwc2.h
Expand Up @@ -16,8 +16,8 @@
* GNU General Public License for more details.
*/

#ifndef HW_USB_DWC2_H
#define HW_USB_DWC2_H
#ifndef HW_USB_HCD_DWC2_H
#define HW_USB_HCD_DWC2_H

#include "qemu/timer.h"
#include "hw/irq.h"
Expand Down
4 changes: 2 additions & 2 deletions include/block/block-hmp-cmds.h
Expand Up @@ -12,8 +12,8 @@
* the COPYING file in the top-level directory.
*/

#ifndef BLOCK_HMP_COMMANDS_H
#define BLOCK_HMP_COMMANDS_H
#ifndef BLOCK_BLOCK_HMP_CMDS_H
#define BLOCK_BLOCK_HMP_CMDS_H

void hmp_drive_add(Monitor *mon, const QDict *qdict);

Expand Down
6 changes: 3 additions & 3 deletions include/crypto/tls-cipher-suites.h
Expand Up @@ -8,8 +8,8 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef QCRYPTO_TLSCIPHERSUITES_H
#define QCRYPTO_TLSCIPHERSUITES_H
#ifndef QCRYPTO_TLS_CIPHER_SUITES_H
#define QCRYPTO_TLS_CIPHER_SUITES_H

#include "qom/object.h"
#include "crypto/tlscreds.h"
Expand All @@ -31,4 +31,4 @@ DECLARE_INSTANCE_CHECKER(QCryptoTLSCipherSuites, QCRYPTO_TLS_CIPHER_SUITES,
GByteArray *qcrypto_tls_cipher_suites_get_data(QCryptoTLSCipherSuites *obj,
Error **errp);

#endif /* QCRYPTO_TLSCIPHERSUITES_H */
#endif /* QCRYPTO_TLS_CIPHER_SUITES_H */
4 changes: 2 additions & 2 deletions include/hw/acpi/generic_event_device.h
Expand Up @@ -56,8 +56,8 @@
*
*/

#ifndef HW_ACPI_GED_H
#define HW_ACPI_GED_H
#ifndef HW_ACPI_GENERIC_EVENT_DEVICE_H
#define HW_ACPI_GENERIC_EVENT_DEVICE_H

#include "hw/sysbus.h"
#include "hw/acpi/memory_hotplug.h"
Expand Down
7 changes: 4 additions & 3 deletions include/hw/i2c/arm_sbcon_i2c.h
Expand Up @@ -9,8 +9,9 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef HW_I2C_ARM_SBCON_H
#define HW_I2C_ARM_SBCON_H

#ifndef HW_I2C_ARM_SBCON_I2C_H
#define HW_I2C_ARM_SBCON_I2C_H

#include "hw/sysbus.h"
#include "hw/i2c/bitbang_i2c.h"
Expand All @@ -34,4 +35,4 @@ struct ArmSbconI2CState {
int in;
};

#endif /* HW_I2C_ARM_SBCON_H */
#endif /* HW_I2C_ARM_SBCON_I2C_H */
4 changes: 2 additions & 2 deletions include/hw/misc/bcm2835_cprman.h
Expand Up @@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef HW_MISC_CPRMAN_H
#define HW_MISC_CPRMAN_H
#ifndef HW_MISC_BCM2835_CPRMAN_H
#define HW_MISC_BCM2835_CPRMAN_H

#include "hw/sysbus.h"
#include "hw/qdev-clock.h"
Expand Down
4 changes: 2 additions & 2 deletions include/hw/misc/bcm2835_cprman_internals.h
Expand Up @@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef HW_MISC_CPRMAN_INTERNALS_H
#define HW_MISC_CPRMAN_INTERNALS_H
#ifndef HW_MISC_BCM2835_CPRMAN_INTERNALS_H
#define HW_MISC_BCM2835_CPRMAN_INTERNALS_H

#include "hw/registerfields.h"
#include "hw/misc/bcm2835_cprman.h"
Expand Down
4 changes: 2 additions & 2 deletions include/hw/misc/stm32f4xx_exti.h
Expand Up @@ -22,8 +22,8 @@
* THE SOFTWARE.
*/

#ifndef HW_STM_EXTI_H
#define HW_STM_EXTI_H
#ifndef HW_STM32F4XX_EXTI_H
#define HW_STM32F4XX_EXTI_H

#include "hw/sysbus.h"
#include "qom/object.h"
Expand Down
4 changes: 2 additions & 2 deletions include/hw/misc/stm32f4xx_syscfg.h
Expand Up @@ -22,8 +22,8 @@
* THE SOFTWARE.
*/

#ifndef HW_STM_SYSCFG_H
#define HW_STM_SYSCFG_H
#ifndef HW_STM32F4XX_SYSCFG_H
#define HW_STM32F4XX_SYSCFG_H

#include "hw/sysbus.h"
#include "qom/object.h"
Expand Down
6 changes: 3 additions & 3 deletions include/hw/misc/xlnx-versal-pmc-iou-slcr.h
Expand Up @@ -51,8 +51,8 @@
* 1: OSPI direct access mode.
*/

#ifndef XILINX_VERSAL_PMC_IOU_SLCR_H
#define XILINX_VERSAL_PMC_IOU_SLCR_H
#ifndef XLNX_VERSAL_PMC_IOU_SLCR_H
#define XLNX_VERSAL_PMC_IOU_SLCR_H

#include "hw/register.h"

Expand All @@ -75,4 +75,4 @@ struct XlnxVersalPmcIouSlcr {
RegisterInfo regs_info[XILINX_VERSAL_PMC_IOU_SLCR_R_MAX];
};

#endif /* XILINX_VERSAL_PMC_IOU_SLCR_H */
#endif /* XLNX_VERSAL_PMC_IOU_SLCR_H */
5 changes: 3 additions & 2 deletions include/hw/net/mv88w8618_eth.h
Expand Up @@ -4,8 +4,9 @@
*
* Copyright (c) 2008-2021 QEMU contributors
*/
#ifndef HW_NET_MV88W8618_H
#define HW_NET_MV88W8618_H

#ifndef HW_NET_MV88W8618_ETH_H
#define HW_NET_MV88W8618_ETH_H

#define TYPE_MV88W8618_ETH "mv88w8618_eth"

Expand Down
4 changes: 2 additions & 2 deletions include/hw/nubus/mac-nubus-bridge.h
Expand Up @@ -6,8 +6,8 @@
*
*/

#ifndef HW_NUBUS_MAC_H
#define HW_NUBUS_MAC_H
#ifndef HW_NUBUS_MAC_NUBUS_BRIDGE_H
#define HW_NUBUS_MAC_NUBUS_BRIDGE_H

#include "hw/nubus/nubus.h"
#include "qom/object.h"
Expand Down
4 changes: 2 additions & 2 deletions include/hw/pci-host/remote.h
Expand Up @@ -8,8 +8,8 @@
*
*/

#ifndef REMOTE_PCIHOST_H
#define REMOTE_PCIHOST_H
#ifndef PCI_HOST_REMOTE_H
#define PCI_HOST_REMOTE_H

#include "exec/memory.h"
#include "hw/pci/pcie_host.h"
Expand Down
5 changes: 3 additions & 2 deletions include/hw/riscv/boot_opensbi.h
Expand Up @@ -4,8 +4,9 @@
*
* Based on include/sbi/{fw_dynamic.h,sbi_scratch.h} from the OpenSBI project.
*/
#ifndef OPENSBI_H
#define OPENSBI_H

#ifndef RISCV_BOOT_OPENSBI_H
#define RISCV_BOOT_OPENSBI_H

/** Expected value of info magic ('OSBI' ascii string in hex) */
#define FW_DYNAMIC_INFO_MAGIC_VALUE 0x4942534f
Expand Down
4 changes: 2 additions & 2 deletions include/hw/riscv/shakti_c.h
Expand Up @@ -16,8 +16,8 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef HW_SHAKTI_H
#define HW_SHAKTI_H
#ifndef HW_SHAKTI_C_H
#define HW_SHAKTI_C_H

#include "hw/riscv/riscv_hart.h"
#include "hw/boards.h"
Expand Down

0 comments on commit 52581c7

Please sign in to comment.