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.  Offenders found with
scripts/clean-header-guards.pl -vn.

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 <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
  • Loading branch information
Markus Armbruster committed Jul 12, 2016
1 parent 85aad98 commit 121d071
Show file tree
Hide file tree
Showing 83 changed files with 223 additions and 215 deletions.
6 changes: 3 additions & 3 deletions crypto/blockpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_BLOCK_PRIV_H__
#define QCRYPTO_BLOCK_PRIV_H__
#ifndef QCRYPTO_BLOCKPRIV_H
#define QCRYPTO_BLOCKPRIV_H

#include "crypto/block.h"

Expand Down Expand Up @@ -89,4 +89,4 @@ int qcrypto_block_encrypt_helper(QCryptoCipher *cipher,
size_t len,
Error **errp);

#endif /* QCRYPTO_BLOCK_PRIV_H__ */
#endif /* QCRYPTO_BLOCKPRIV_H */
6 changes: 3 additions & 3 deletions crypto/ivgenpriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_IVGEN_PRIV_H__
#define QCRYPTO_IVGEN_PRIV_H__
#ifndef QCRYPTO_IVGENPRIV_H
#define QCRYPTO_IVGENPRIV_H

#include "crypto/ivgen.h"

Expand All @@ -46,4 +46,4 @@ struct QCryptoIVGen {
};


#endif /* QCRYPTO_IVGEN_PRIV_H__ */
#endif /* QCRYPTO_IVGENPRIV_H */
7 changes: 3 additions & 4 deletions crypto/tlscredspriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_TLSCRED_PRIV_H__
#define QCRYPTO_TLSCRED_PRIV_H__
#ifndef QCRYPTO_TLSCREDSPRIV_H
#define QCRYPTO_TLSCREDSPRIV_H

#include "crypto/tlscreds.h"

Expand All @@ -38,5 +38,4 @@ int qcrypto_tls_creds_get_dh_params_file(QCryptoTLSCreds *creds,

#endif

#endif /* QCRYPTO_TLSCRED_PRIV_H__ */

#endif /* QCRYPTO_TLSCREDSPRIV_H */
6 changes: 4 additions & 2 deletions fsdev/file-op-9p.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
* the COPYING file in the top-level directory.
*
*/
#ifndef _FILEOP_H
#define _FILEOP_H

#ifndef FILE_OP_9P_H
#define FILE_OP_9P_H

#include <dirent.h>
#include <utime.h>
#include <sys/vfs.h>
Expand Down
4 changes: 2 additions & 2 deletions hw/9pfs/9p-synth.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
* the COPYING file in the top-level directory.
*
*/
#ifndef HW_9PFS_SYNTH_H
#define HW_9PFS_SYNTH_H 1

#ifndef QEMU_9P_SYNTH_H
#define QEMU_9P_SYNTH_H

typedef struct V9fsSynthNode V9fsSynthNode;
typedef ssize_t (*v9fs_synth_read)(void *buf, int len, off_t offset,
Expand Down
4 changes: 2 additions & 2 deletions hw/alpha/alpha_sys.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Alpha cores and system support chips. */

#ifndef HW_ALPHA_H
#define HW_ALPHA_H 1
#ifndef HW_ALPHA_SYS_H
#define HW_ALPHA_SYS_H

#include "target-alpha/cpu-qom.h"
#include "hw/pci/pci.h"
Expand Down
6 changes: 3 additions & 3 deletions hw/lm32/milkymist-hw.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef QEMU_HW_MILKYMIST_H
#define QEMU_HW_MILKYMIST_H
#ifndef QEMU_HW_MILKYMIST_HW_H
#define QEMU_HW_MILKYMIST_HW_H

#include "hw/qdev.h"
#include "net/net.h"
Expand Down Expand Up @@ -203,4 +203,4 @@ static inline DeviceState *milkymist_softusb_create(hwaddr base,
return dev;
}

#endif /* QEMU_HW_MILKYMIST_H */
#endif /* QEMU_HW_MILKYMIST_HW_H */
7 changes: 3 additions & 4 deletions hw/net/e1000_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
* Structures, enums, and macros for the MAC
*/

#ifndef _E1000_HW_H_
#define _E1000_HW_H_

#ifndef HW_E1000_REGS_H
#define HW_E1000_REGS_H

/* PCI Device IDs */
#define E1000_DEV_ID_82542 0x1000
Expand Down Expand Up @@ -1248,4 +1247,4 @@ struct e1000_data_desc {
#define E1000_IOADDR 0x00
#define E1000_IODATA 0x04

#endif /* _E1000_HW_H_ */
#endif /* HW_E1000_REGS_H */
4 changes: 2 additions & 2 deletions hw/pci-bridge/dec.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DEC_PCI_H
#define DEC_PCI_H
#ifndef HW_PCI_BRIDGE_DEC_H
#define HW_PCI_BRIDGE_DEC_H

#include "qemu-common.h"

Expand Down
6 changes: 3 additions & 3 deletions hw/ppc/ppc405.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* THE SOFTWARE.
*/

#if !defined(PPC_405_H)
#define PPC_405_H
#ifndef PPC405_H
#define PPC405_H

#include "hw/ppc/ppc4xx.h"

Expand Down Expand Up @@ -78,4 +78,4 @@ CPUPPCState *ppc_stb025_init (MemoryRegion ram_memories[2],
uint32_t sysclk, qemu_irq **picp,
ram_addr_t *offsetp);

#endif /* !defined(PPC_405_H) */
#endif /* PPC405_H */
6 changes: 3 additions & 3 deletions hw/scsi/mfi.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
* SUCH DAMAGE.
*/

#ifndef MFI_REG_H
#define MFI_REG_H
#ifndef SCSI_MFI_H
#define SCSI_MFI_H

/*
* MegaRAID SAS MFI firmware definitions
Expand Down Expand Up @@ -1269,4 +1269,4 @@ struct mfi_config_data {
#define MFI_SCSI_MAX_CMDS 8
#define MFI_SCSI_MAX_CDB_LEN 16

#endif /* MFI_REG_H */
#endif /* SCSI_MFI_H */
7 changes: 4 additions & 3 deletions hw/tpm/tpm_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
* 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/>
*/
#ifndef TPM_TPM_UTILS_H
#define TPM_TPM_UTILS_H

#ifndef TPM_TPM_UTIL_H
#define TPM_TPM_UTIL_H

#include "sysemu/tpm_backend.h"

int tpm_util_test_tpmdev(int tpm_fd, TPMVersion *tpm_version);

#endif /* TPM_TPM_UTILS_H */
#endif /* TPM_TPM_UTIL_H */
5 changes: 3 additions & 2 deletions hw/usb/hcd-ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
* 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_USB_EHCI_H
#define HW_USB_EHCI_H 1

#ifndef HW_USB_HCD_EHCI_H
#define HW_USB_HCD_EHCI_H

#include "hw/hw.h"
#include "qemu/timer.h"
Expand Down
5 changes: 3 additions & 2 deletions include/block/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
* This header file contains public constants and structures used by
* the scsi code for linux.
*/
#ifndef HW_SCSI_DEFS_H
#define HW_SCSI_DEFS_H 1

#ifndef BLOCK_SCSI_H
#define BLOCK_SCSI_H

/*
* SCSI opcodes
Expand Down
5 changes: 3 additions & 2 deletions include/crypto/desrfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
#ifndef D3DES_H
#define D3DES_H 1

#ifndef QCRYPTO_DESRFB_H
#define QCRYPTO_DESRFB_H

/* d3des.h -
*
Expand Down
7 changes: 3 additions & 4 deletions include/crypto/tlscreds.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_TLSCRED_H__
#define QCRYPTO_TLSCRED_H__
#ifndef QCRYPTO_TLSCREDS_H
#define QCRYPTO_TLSCREDS_H

#include "qom/object.h"

Expand Down Expand Up @@ -63,5 +63,4 @@ struct QCryptoTLSCredsClass {
};


#endif /* QCRYPTO_TLSCRED_H__ */

#endif /* QCRYPTO_TLSCREDS_H */
7 changes: 3 additions & 4 deletions include/crypto/tlscredsanon.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_TLSCRED_ANON_H__
#define QCRYPTO_TLSCRED_ANON_H__
#ifndef QCRYPTO_TLSCREDSANON_H
#define QCRYPTO_TLSCREDSANON_H

#include "crypto/tlscreds.h"

Expand Down Expand Up @@ -108,5 +108,4 @@ struct QCryptoTLSCredsAnonClass {
};


#endif /* QCRYPTO_TLSCRED_H__ */

#endif /* QCRYPTO_TLSCREDSANON_H */
7 changes: 3 additions & 4 deletions include/crypto/tlscredsx509.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_TLSCRED_X509_H__
#define QCRYPTO_TLSCRED_X509_H__
#ifndef QCRYPTO_TLSCREDSX509_H
#define QCRYPTO_TLSCREDSX509_H

#include "crypto/tlscreds.h"

Expand Down Expand Up @@ -110,5 +110,4 @@ struct QCryptoTLSCredsX509Class {
};


#endif /* QCRYPTO_TLSCRED_X509_H__ */

#endif /* QCRYPTO_TLSCREDSX509_H */
6 changes: 3 additions & 3 deletions include/crypto/tlssession.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
*
*/

#ifndef QCRYPTO_TLS_SESSION_H__
#define QCRYPTO_TLS_SESSION_H__
#ifndef QCRYPTO_TLSSESSION_H
#define QCRYPTO_TLSSESSION_H

#include "crypto/tlscreds.h"

Expand Down Expand Up @@ -319,4 +319,4 @@ int qcrypto_tls_session_get_key_size(QCryptoTLSSession *sess,
*/
char *qcrypto_tls_session_get_peer_name(QCryptoTLSSession *sess);

#endif /* QCRYPTO_TLS_SESSION_H__ */
#endif /* QCRYPTO_TLSSESSION_H */
6 changes: 3 additions & 3 deletions include/disas/bfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
interface, for making instruction-processing programs more independent
of the instruction set being processed. */

#ifndef DIS_ASM_H
#define DIS_ASM_H
#ifndef DISAS_BFD_H
#define DISAS_BFD_H

#include "qemu-common.h"

Expand Down Expand Up @@ -489,4 +489,4 @@ bfd_vma bfd_getl16 (const bfd_byte *addr);
bfd_vma bfd_getb16 (const bfd_byte *addr);
typedef bool bfd_boolean;

#endif /* ! defined (DIS_ASM_H) */
#endif /* DISAS_BFD_H */
4 changes: 2 additions & 2 deletions include/exec/address-spaces.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
*
*/

#ifndef EXEC_MEMORY_H
#define EXEC_MEMORY_H
#ifndef EXEC_ADDRESS_SPACES_H
#define EXEC_ADDRESS_SPACES_H

/*
* Internal interfaces between memory.c/exec.c/vl.c. Do not #include unless
Expand Down
7 changes: 3 additions & 4 deletions include/exec/helper-head.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
GEN_HELPER 2 to do runtime registration helper functions.
*/

#ifndef DEF_HELPER_H
#define DEF_HELPER_H 1

#ifndef EXEC_HELPER_HEAD_H
#define EXEC_HELPER_HEAD_H

#define HELPER(name) glue(helper_, name)

Expand Down Expand Up @@ -133,4 +132,4 @@

/* MAX_OPC_PARAM_IARGS must be set to n if last entry is DEF_HELPER_FLAGS_n. */

#endif /* DEF_HELPER_H */
#endif /* EXEC_HELPER_HEAD_H */
5 changes: 3 additions & 2 deletions include/exec/user/abitypes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef QEMU_TYPES_H
#define QEMU_TYPES_H
#ifndef EXEC_USER_ABITYPES_H
#define EXEC_USER_ABITYPES_H

#include "cpu.h"

#ifdef TARGET_ABI32
Expand Down
4 changes: 2 additions & 2 deletions include/hw/acpi/aml-build.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef HW_ACPI_GEN_UTILS_H
#define HW_ACPI_GEN_UTILS_H
#ifndef HW_ACPI_AML_BUILD_H
#define HW_ACPI_AML_BUILD_H

#include "hw/acpi/acpi-defs.h"
#include "hw/acpi/bios-linker-loader.h"
Expand Down
5 changes: 3 additions & 2 deletions include/hw/acpi/cpu_hotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#ifndef ACPI_HOTPLUG_H
#define ACPI_HOTPLUG_H

#ifndef HW_ACPI_CPU_HOTPLUG_H
#define HW_ACPI_CPU_HOTPLUG_H

#include "hw/acpi/acpi.h"
#include "hw/acpi/pc-hotplug.h"
Expand Down
6 changes: 3 additions & 3 deletions include/hw/arm/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
*
*/

#ifndef ARM_MISC_H
#define ARM_MISC_H 1
#ifndef HW_ARM_H
#define HW_ARM_H

#include "exec/memory.h"
#include "target-arm/cpu-qom.h"
Expand Down Expand Up @@ -140,4 +140,4 @@ void arm_write_secure_board_setup_dummy_smc(ARMCPU *cpu,
ticks. */
extern int system_clock_scale;

#endif /* !ARM_MISC_H */
#endif /* HW_ARM_H */
4 changes: 2 additions & 2 deletions include/hw/arm/stm32f205_soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* THE SOFTWARE.
*/

#ifndef HW_ARM_STM32F205SOC_H
#define HW_ARM_STM32F205SOC_H
#ifndef HW_ARM_STM32F205_SOC_H
#define HW_ARM_STM32F205_SOC_H

#include "hw/misc/stm32f2xx_syscfg.h"
#include "hw/timer/stm32f2xx_timer.h"
Expand Down
4 changes: 2 additions & 2 deletions include/hw/audio/audio.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef HW_AUDIODEV_H
#define HW_AUDIODEV_H 1
#ifndef HW_AUDIO_H
#define HW_AUDIO_H

void isa_register_soundhw(const char *name, const char *descr,
int (*init_isa)(ISABus *bus));
Expand Down
Loading

0 comments on commit 121d071

Please sign in to comment.