diff mbox

[13/18] Clean up header guards that don't match their file name

Message ID 1467215765-22981-14-git-send-email-armbru@redhat.com
State New
Headers show

Commit Message

Markus Armbruster June 29, 2016, 3:56 p.m. UTC
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 <armbru@redhat.com>
---
 crypto/blockpriv.h                       | 6 +++---
 crypto/ivgenpriv.h                       | 6 +++---
 crypto/tlscredspriv.h                    | 7 +++----
 fsdev/file-op-9p.h                       | 6 ++++--
 hw/9pfs/9p-synth.h                       | 4 ++--
 hw/alpha/alpha_sys.h                     | 4 ++--
 hw/lm32/milkymist-hw.h                   | 6 +++---
 hw/net/e1000_regs.h                      | 7 +++----
 hw/pci-bridge/dec.h                      | 4 ++--
 hw/ppc/ppc405.h                          | 6 +++---
 hw/scsi/mfi.h                            | 6 +++---
 hw/tpm/tpm_util.h                        | 7 ++++---
 hw/usb/hcd-ehci.h                        | 5 +++--
 include/block/scsi.h                     | 5 +++--
 include/crypto/desrfb.h                  | 5 +++--
 include/crypto/tlscreds.h                | 7 +++----
 include/crypto/tlscredsanon.h            | 7 +++----
 include/crypto/tlscredsx509.h            | 7 +++----
 include/crypto/tlssession.h              | 6 +++---
 include/disas/bfd.h                      | 6 +++---
 include/exec/address-spaces.h            | 4 ++--
 include/exec/helper-head.h               | 7 +++----
 include/exec/user/abitypes.h             | 5 +++--
 include/hw/acpi/aml-build.h              | 4 ++--
 include/hw/acpi/cpu_hotplug.h            | 5 +++--
 include/hw/arm/arm.h                     | 6 +++---
 include/hw/arm/stm32f205_soc.h           | 4 ++--
 include/hw/audio/audio.h                 | 4 ++--
 include/hw/block/block.h                 | 4 ++--
 include/hw/char/pl011.h                  | 4 ++--
 include/hw/cris/etraxfs.h                | 4 ++--
 include/hw/intc/allwinner-a10-pic.h      | 4 ++--
 include/hw/misc/arm_integrator_debug.h   | 5 +++--
 include/hw/misc/mips_cmgcr.h             | 6 +++---
 include/hw/misc/tmp105_regs.h            | 5 +++--
 include/hw/net/allwinner_emac.h          | 5 +++--
 include/hw/nvram/openbios_firmware_abi.h | 6 +++---
 include/hw/pci-host/apb.h                | 4 ++--
 include/hw/pci-host/ppce500.h            | 4 ++--
 include/hw/pci-host/spapr.h              | 6 +++---
 include/hw/ppc/ppc4xx.h                  | 6 +++---
 include/hw/s390x/ioinst.h                | 4 ++--
 include/hw/ssi/xilinx_spips.h            | 6 +++---
 include/hw/timer/a9gtimer.h              | 6 +++---
 include/hw/timer/allwinner-a10-pit.h     | 4 ++--
 include/hw/timer/hpet.h                  | 5 +++--
 include/hw/timer/m48t59.h                | 6 +++---
 include/hw/timer/mc146818rtc_regs.h      | 5 +++--
 include/hw/tricore/tricore.h             | 4 ++--
 include/hw/vfio/vfio.h                   | 4 ++--
 include/hw/virtio/virtio-gpu.h           | 4 ++--
 include/libdecnumber/decNumberLocal.h    | 5 +++--
 include/migration/block.h                | 6 +++---
 include/monitor/hmp-target.h             | 7 ++++---
 include/monitor/qdev.h                   | 4 ++--
 include/qapi/qmp/dispatch.h              | 5 ++---
 include/qapi/qmp/types.h                 | 6 +++---
 include/qapi/visitor.h                   | 5 +++--
 include/qemu/config-file.h               | 6 +++---
 include/qemu/error-report.h              | 5 ++---
 include/qemu/fifo8.h                     | 6 +++---
 include/qemu/option.h                    | 4 ++--
 include/qemu/option_int.h                | 4 ++--
 include/qemu/sockets.h                   | 7 ++++---
 include/sysemu/bt.h                      | 4 ++--
 include/sysemu/hostmem.h                 | 5 +++--
 include/sysemu/tpm_backend.h             | 4 ++--
 include/sysemu/tpm_backend_int.h         | 7 +++----
 net/tap_int.h                            | 6 +++---
 qga/service-win32.h                      | 5 +++--
 qga/vss-win32/vss-common.h               | 4 ++--
 slirp/ip6_icmp.h                         | 4 ++--
 slirp/slirp.h                            | 4 ++--
 target-i386/hyperv.h                     | 4 ++--
 target-openrisc/exception.h              | 6 +++---
 target-tilegx/opcode_tilegx.h            | 6 +++---
 target-xtensa/core-dc232b/core-isa.h     | 7 +++----
 target-xtensa/core-dc233c/core-isa.h     | 7 +++----
 target-xtensa/core-fsf/core-isa.h        | 7 +++----
 ui/vnc-enc-tight.h                       | 6 +++---
 ui/vnc-enc-zrle.h                        | 4 ++--
 ui/vnc-enc-zywrle.h                      | 4 ++--
 82 files changed, 219 insertions(+), 212 deletions(-)
diff mbox

Patch

diff --git a/crypto/blockpriv.h b/crypto/blockpriv.h
index 6297085..15b547d 100644
--- a/crypto/blockpriv.h
+++ b/crypto/blockpriv.h
@@ -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"
 
@@ -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 */
diff --git a/crypto/ivgenpriv.h b/crypto/ivgenpriv.h
index 7b87e02..28e5c67 100644
--- a/crypto/ivgenpriv.h
+++ b/crypto/ivgenpriv.h
@@ -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"
 
@@ -46,4 +46,4 @@  struct QCryptoIVGen {
 };
 
 
-#endif /* QCRYPTO_IVGEN_PRIV_H__ */
+#endif /* QCRYPTO_IVGENPRIV_H */
diff --git a/crypto/tlscredspriv.h b/crypto/tlscredspriv.h
index 9222be4..13e9b6c 100644
--- a/crypto/tlscredspriv.h
+++ b/crypto/tlscredspriv.h
@@ -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"
 
@@ -38,5 +38,4 @@  int qcrypto_tls_creds_get_dh_params_file(QCryptoTLSCreds *creds,
 
 #endif
 
-#endif /* QCRYPTO_TLSCRED_PRIV_H__ */
-
+#endif /* QCRYPTO_TLSCREDSPRIV_H */
diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index 5561494..6aefb9e 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -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/uio.h>
diff --git a/hw/9pfs/9p-synth.h b/hw/9pfs/9p-synth.h
index 7c8441b..6bcb44a 100644
--- a/hw/9pfs/9p-synth.h
+++ b/hw/9pfs/9p-synth.h
@@ -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,
diff --git a/hw/alpha/alpha_sys.h b/hw/alpha/alpha_sys.h
index fcaeb2b..ed911f2 100644
--- a/hw/alpha/alpha_sys.h
+++ b/hw/alpha/alpha_sys.h
@@ -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"
diff --git a/hw/lm32/milkymist-hw.h b/hw/lm32/milkymist-hw.h
index eb6a3a2..4418b44 100644
--- a/hw/lm32/milkymist-hw.h
+++ b/hw/lm32/milkymist-hw.h
@@ -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"
@@ -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 */
diff --git a/hw/net/e1000_regs.h b/hw/net/e1000_regs.h
index c1acd45..23eed50 100644
--- a/hw/net/e1000_regs.h
+++ b/hw/net/e1000_regs.h
@@ -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
@@ -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 */
diff --git a/hw/pci-bridge/dec.h b/hw/pci-bridge/dec.h
index 17dc0c2..ae17ca7 100644
--- a/hw/pci-bridge/dec.h
+++ b/hw/pci-bridge/dec.h
@@ -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"
 
diff --git a/hw/ppc/ppc405.h b/hw/ppc/ppc405.h
index 1c5f04f..c67febc 100644
--- a/hw/ppc/ppc405.h
+++ b/hw/ppc/ppc405.h
@@ -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"
 
@@ -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 */
diff --git a/hw/scsi/mfi.h b/hw/scsi/mfi.h
index 29d4177..e67a5c0 100644
--- a/hw/scsi/mfi.h
+++ b/hw/scsi/mfi.h
@@ -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
@@ -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 */
diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
index e7f354a..df76245 100644
--- a/hw/tpm/tpm_util.h
+++ b/hw/tpm/tpm_util.h
@@ -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 */
diff --git a/hw/usb/hcd-ehci.h b/hw/usb/hcd-ehci.h
index 3021842..3fd7038 100644
--- a/hw/usb/hcd-ehci.h
+++ b/hw/usb/hcd-ehci.h
@@ -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"
diff --git a/include/block/scsi.h b/include/block/scsi.h
index a311341..d938ffc 100644
--- a/include/block/scsi.h
+++ b/include/block/scsi.h
@@ -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
diff --git a/include/crypto/desrfb.h b/include/crypto/desrfb.h
index 773667e..7ca596c 100644
--- a/include/crypto/desrfb.h
+++ b/include/crypto/desrfb.h
@@ -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 -
  *
diff --git a/include/crypto/tlscreds.h b/include/crypto/tlscreds.h
index 8e2babd..3440c9a 100644
--- a/include/crypto/tlscreds.h
+++ b/include/crypto/tlscreds.h
@@ -18,8 +18,8 @@ 
  *
  */
 
-#ifndef QCRYPTO_TLSCRED_H__
-#define QCRYPTO_TLSCRED_H__
+#ifndef QCRYPTO_TLSCREDS_H
+#define QCRYPTO_TLSCREDS_H
 
 #include "qom/object.h"
 
@@ -62,5 +62,4 @@  struct QCryptoTLSCredsClass {
 };
 
 
-#endif /* QCRYPTO_TLSCRED_H__ */
-
+#endif /* QCRYPTO_TLSCREDS_H */
diff --git a/include/crypto/tlscredsanon.h b/include/crypto/tlscredsanon.h
index d3976b8..4d6b7e4 100644
--- a/include/crypto/tlscredsanon.h
+++ b/include/crypto/tlscredsanon.h
@@ -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"
 
@@ -108,5 +108,4 @@  struct QCryptoTLSCredsAnonClass {
 };
 
 
-#endif /* QCRYPTO_TLSCRED_H__ */
-
+#endif /* QCRYPTO_TLSCREDSANON_H */
diff --git a/include/crypto/tlscredsx509.h b/include/crypto/tlscredsx509.h
index 25796d7..66ad6a7 100644
--- a/include/crypto/tlscredsx509.h
+++ b/include/crypto/tlscredsx509.h
@@ -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"
 
@@ -110,5 +110,4 @@  struct QCryptoTLSCredsX509Class {
 };
 
 
-#endif /* QCRYPTO_TLSCRED_X509_H__ */
-
+#endif /* QCRYPTO_TLSCREDSX509_H */
diff --git a/include/crypto/tlssession.h b/include/crypto/tlssession.h
index c1bad9e..1c7414e 100644
--- a/include/crypto/tlssession.h
+++ b/include/crypto/tlssession.h
@@ -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"
 
@@ -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 */
diff --git a/include/disas/bfd.h b/include/disas/bfd.h
index a112e9c..5fbff00 100644
--- a/include/disas/bfd.h
+++ b/include/disas/bfd.h
@@ -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"
 
@@ -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 */
diff --git a/include/exec/address-spaces.h b/include/exec/address-spaces.h
index 3d12cdd..db8bfa9 100644
--- a/include/exec/address-spaces.h
+++ b/include/exec/address-spaces.h
@@ -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
diff --git a/include/exec/helper-head.h b/include/exec/helper-head.h
index 74f8f03..1cfc43b 100644
--- a/include/exec/helper-head.h
+++ b/include/exec/helper-head.h
@@ -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)
 
@@ -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 */
diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h
index 80eedac..a09d6c6 100644
--- a/include/exec/user/abitypes.h
+++ b/include/exec/user/abitypes.h
@@ -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
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index e7a1a4c..e5f0878 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -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"
diff --git a/include/hw/acpi/cpu_hotplug.h b/include/hw/acpi/cpu_hotplug.h
index b995ef2..3b932ab 100644
--- a/include/hw/acpi/cpu_hotplug.h
+++ b/include/hw/acpi/cpu_hotplug.h
@@ -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"
diff --git a/include/hw/arm/arm.h b/include/hw/arm/arm.h
index 8b49a98..aeeebfe 100644
--- a/include/hw/arm/arm.h
+++ b/include/hw/arm/arm.h
@@ -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"
@@ -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 */
diff --git a/include/hw/arm/stm32f205_soc.h b/include/hw/arm/stm32f205_soc.h
index 0390eff..779b5da 100644
--- a/include/hw/arm/stm32f205_soc.h
+++ b/include/hw/arm/stm32f205_soc.h
@@ -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"
diff --git a/include/hw/audio/audio.h b/include/hw/audio/audio.h
index b28abdd..55d40f7 100644
--- a/include/hw/audio/audio.h
+++ b/include/hw/audio/audio.h
@@ -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));
diff --git a/include/hw/block/block.h b/include/hw/block/block.h
index 984660e..87c87ed 100644
--- a/include/hw/block/block.h
+++ b/include/hw/block/block.h
@@ -8,8 +8,8 @@ 
  * later.  See the COPYING file in the top-level directory.
  */
 
-#ifndef HW_BLOCK_COMMON_H
-#define HW_BLOCK_COMMON_H
+#ifndef HW_BLOCK_H
+#define HW_BLOCK_H
 
 #include "qemu-common.h"
 
diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h
index 93bd7ee..0ca7c19 100644
--- a/include/hw/char/pl011.h
+++ b/include/hw/char/pl011.h
@@ -12,8 +12,8 @@ 
  * this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef PL011_UART_H
-#define PL011_UART_H
+#ifndef HW_PL011_H
+#define HW_PL011_H
 
 static inline DeviceState *pl011_create(hwaddr addr,
                                         qemu_irq irq,
diff --git a/include/hw/cris/etraxfs.h b/include/hw/cris/etraxfs.h
index eb66418..723a275 100644
--- a/include/hw/cris/etraxfs.h
+++ b/include/hw/cris/etraxfs.h
@@ -22,8 +22,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef HW_EXTRAXFS_H
-#define HW_EXTRAXFS_H 1
+#ifndef HW_ETRAXFS_H
+#define HW_ETRAXFS_H
 
 #include "net/net.h"
 #include "hw/cris/etraxfs_dma.h"
diff --git a/include/hw/intc/allwinner-a10-pic.h b/include/hw/intc/allwinner-a10-pic.h
index 5721b2e..1d314a7 100644
--- a/include/hw/intc/allwinner-a10-pic.h
+++ b/include/hw/intc/allwinner-a10-pic.h
@@ -1,5 +1,5 @@ 
-#ifndef AW_A10_PIC_H
-#define AW_A10_PIC_H
+#ifndef ALLWINNER_A10_PIC_H
+#define ALLWINNER_A10_PIC_H
 
 #define TYPE_AW_A10_PIC  "allwinner-a10-pic"
 #define AW_A10_PIC(obj) OBJECT_CHECK(AwA10PICState, (obj), TYPE_AW_A10_PIC)
diff --git a/include/hw/misc/arm_integrator_debug.h b/include/hw/misc/arm_integrator_debug.h
index 37789b6..0077dac 100644
--- a/include/hw/misc/arm_integrator_debug.h
+++ b/include/hw/misc/arm_integrator_debug.h
@@ -10,8 +10,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 QEMU_INTEGRATOR_DEBUG_H
-#define QEMU_INTEGRATOR_DEBUG_H
+
+#ifndef ARM_INTEGRATOR_DEBUG_H
+#define ARM_INTEGRATOR_DEBUG_H
 
 #define TYPE_INTEGRATOR_DEBUG "integrator_debug"
 
diff --git a/include/hw/misc/mips_cmgcr.h b/include/hw/misc/mips_cmgcr.h
index cc60eef..6c49a64 100644
--- a/include/hw/misc/mips_cmgcr.h
+++ b/include/hw/misc/mips_cmgcr.h
@@ -7,8 +7,8 @@ 
  *
  */
 
-#ifndef _MIPS_GCR_H
-#define _MIPS_GCR_H
+#ifndef MIPS_CMGCR_H
+#define MIPS_CMGCR_H
 
 #define TYPE_MIPS_GCR "mips-gcr"
 #define MIPS_GCR(obj) OBJECT_CHECK(MIPSGCRState, (obj), TYPE_MIPS_GCR)
@@ -56,4 +56,4 @@  struct MIPSGCRState {
     uint64_t cpc_base;
 };
 
-#endif /* _MIPS_GCR_H */
+#endif /* MIPS_CMGCR_H */
diff --git a/include/hw/misc/tmp105_regs.h b/include/hw/misc/tmp105_regs.h
index 9b55aba..ef015ee 100644
--- a/include/hw/misc/tmp105_regs.h
+++ b/include/hw/misc/tmp105_regs.h
@@ -11,8 +11,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 QEMU_TMP105_MSGS_H
-#define QEMU_TMP105_MSGS_H
+
+#ifndef TMP105_REGS_H
+#define TMP105_REGS_H
 
 /**
  * TMP105Reg:
diff --git a/include/hw/net/allwinner_emac.h b/include/hw/net/allwinner_emac.h
index 9f21aa7..4cc8aab 100644
--- a/include/hw/net/allwinner_emac.h
+++ b/include/hw/net/allwinner_emac.h
@@ -19,8 +19,9 @@ 
  * GNU General Public License for more details.
  *
  */
-#ifndef AW_EMAC_H
-#define AW_EMAC_H
+
+#ifndef ALLWINNER_EMAC_H
+#define ALLWINNER_EMAC_H
 
 #include "net/net.h"
 #include "qemu/fifo8.h"
diff --git a/include/hw/nvram/openbios_firmware_abi.h b/include/hw/nvram/openbios_firmware_abi.h
index c66ee22..74cfd56 100644
--- a/include/hw/nvram/openbios_firmware_abi.h
+++ b/include/hw/nvram/openbios_firmware_abi.h
@@ -1,5 +1,5 @@ 
-#ifndef FIRMWARE_ABI_H
-#define FIRMWARE_ABI_H
+#ifndef OPENBIOS_FIRMWARE_ABI_H
+#define OPENBIOS_FIRMWARE_ABI_H
 
 /* OpenBIOS NVRAM partition */
 struct OpenBIOS_nvpart_v1 {
@@ -72,4 +72,4 @@  Sun_init_header(struct Sun_nvram *header, const uint8_t *macaddr, int machine_id
 
     header->checksum = tmp;
 }
-#endif /* FIRMWARE_ABI_H */
+#endif /* OPENBIOS_FIRMWARE_ABI_H */
diff --git a/include/hw/pci-host/apb.h b/include/hw/pci-host/apb.h
index 736db61..b19bd55 100644
--- a/include/hw/pci-host/apb.h
+++ b/include/hw/pci-host/apb.h
@@ -1,5 +1,5 @@ 
-#ifndef APB_PCI_H
-#define APB_PCI_H
+#ifndef PCI_HOST_APB_H
+#define PCI_HOST_APB_H
 
 #include "qemu-common.h"
 
diff --git a/include/hw/pci-host/ppce500.h b/include/hw/pci-host/ppce500.h
index 61f773e..e3a3742 100644
--- a/include/hw/pci-host/ppce500.h
+++ b/include/hw/pci-host/ppce500.h
@@ -1,5 +1,5 @@ 
-#ifndef PPCE500_PCI_H
-#define PPCE500_PCI_H
+#ifndef PCI_HOST_PPCE500_H
+#define PCI_HOST_PPCE500_H
 
 static inline int ppce500_pci_map_irq_slot(int devno, int irq_num)
 {
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 49a44d9..368771b 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -17,8 +17,8 @@ 
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#if !defined(__HW_SPAPR_PCI_H__)
-#define __HW_SPAPR_PCI_H__
+#ifndef PCI_HOST_SPAPR_H
+#define PCI_HOST_SPAPR_H
 
 #include "hw/ppc/spapr.h"
 #include "hw/pci/pci.h"
@@ -147,4 +147,4 @@  static inline void spapr_phb_vfio_reset(DeviceState *qdev)
 
 void spapr_phb_dma_reset(sPAPRPHBState *sphb);
 
-#endif /* __HW_SPAPR_PCI_H__ */
+#endif /* PCI_HOST_SPAPR_H */
diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h
index 91d84ba..3b01ae8 100644
--- a/include/hw/ppc/ppc4xx.h
+++ b/include/hw/ppc/ppc4xx.h
@@ -22,8 +22,8 @@ 
  * THE SOFTWARE.
  */
 
-#if !defined(PPC_4XX_H)
-#define PPC_4XX_H
+#ifndef PPC4XX_H
+#define PPC4XX_H
 
 #include "hw/pci/pci.h"
 
@@ -61,4 +61,4 @@  PCIBus *ppc4xx_pci_init(CPUPPCState *env, qemu_irq pci_irqs[4],
                         hwaddr special_cycle,
                         hwaddr registers);
 
-#endif /* !defined(PPC_4XX_H) */
+#endif /* PPC4XX_H */
diff --git a/include/hw/s390x/ioinst.h b/include/hw/s390x/ioinst.h
index 12d44c8..c559f53 100644
--- a/include/hw/s390x/ioinst.h
+++ b/include/hw/s390x/ioinst.h
@@ -9,8 +9,8 @@ 
  * directory.
 */
 
-#ifndef IOINST_S390X_H
-#define IOINST_S390X_H
+#ifndef S390X_IOINST_H
+#define S390X_IOINST_H
 
 /*
  * Channel I/O related definitions, as defined in the Principles
diff --git a/include/hw/ssi/xilinx_spips.h b/include/hw/ssi/xilinx_spips.h
index dbb9eef..06aa096 100644
--- a/include/hw/ssi/xilinx_spips.h
+++ b/include/hw/ssi/xilinx_spips.h
@@ -22,8 +22,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef XLNX_SPIPS_H
-#define XLNX_SPIPS_H
+#ifndef XILINX_SPIPS_H
+#define XILINX_SPIPS_H
 
 #include "hw/ssi/ssi.h"
 #include "qemu/fifo8.h"
@@ -69,4 +69,4 @@  struct XilinxSPIPS {
 #define XILINX_QSPIPS(obj) \
      OBJECT_CHECK(XilinxQSPIPS, (obj), TYPE_XILINX_QSPIPS)
 
-#endif /* XLNX_SPIPS_H */
+#endif /* XILINX_SPIPS_H */
diff --git a/include/hw/timer/a9gtimer.h b/include/hw/timer/a9gtimer.h
index 98d8e0a..81c4388 100644
--- a/include/hw/timer/a9gtimer.h
+++ b/include/hw/timer/a9gtimer.h
@@ -20,8 +20,8 @@ 
  * with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef HW_TIMER_A9_GTIMER_H_H
-#define HW_TIMER_A9_GTIMER_H_H
+#ifndef A9GTIMER_H
+#define A9GTIMER_H
 
 #include "hw/sysbus.h"
 
@@ -94,4 +94,4 @@  typedef struct A9GTimerUpdate {
     uint64_t new;
 } A9GTimerUpdate;
 
-#endif /* #ifdef HW_TIMER_A9_GTIMER_H_H */
+#endif /* A9GTIMER_H */
diff --git a/include/hw/timer/allwinner-a10-pit.h b/include/hw/timer/allwinner-a10-pit.h
index 770bdc0..c0cc3e2 100644
--- a/include/hw/timer/allwinner-a10-pit.h
+++ b/include/hw/timer/allwinner-a10-pit.h
@@ -1,5 +1,5 @@ 
-#ifndef AW_A10_PIT_H
-#define AW_A10_PIT_H
+#ifndef ALLWINNER_A10_PIT_H
+#define ALLWINNER_A10_PIT_H
 
 #include "hw/ptimer.h"
 
diff --git a/include/hw/timer/hpet.h b/include/hw/timer/hpet.h
index f38bcfe..f04c4d3 100644
--- a/include/hw/timer/hpet.h
+++ b/include/hw/timer/hpet.h
@@ -10,8 +10,9 @@ 
  * the COPYING file in the top-level directory.
  *
  */
-#ifndef QEMU_HPET_EMUL_H
-#define QEMU_HPET_EMUL_H
+
+#ifndef HW_HPET_H
+#define HW_HPET_H
 
 #include "qom/object.h"
 
diff --git a/include/hw/timer/m48t59.h b/include/hw/timer/m48t59.h
index 3367923..db5e43a 100644
--- a/include/hw/timer/m48t59.h
+++ b/include/hw/timer/m48t59.h
@@ -1,5 +1,5 @@ 
-#ifndef NVRAM_H
-#define NVRAM_H
+#ifndef HW_M48T59_H
+#define HW_M48T59_H
 
 #include "qemu-common.h"
 #include "qom/object.h"
@@ -31,4 +31,4 @@  Nvram *m48t59_init(qemu_irq IRQ, hwaddr mem_base,
                    uint32_t io_base, uint16_t size, int base_year,
                    int type);
 
-#endif /* !NVRAM_H */
+#endif /* HW_M48T59_H */
diff --git a/include/hw/timer/mc146818rtc_regs.h b/include/hw/timer/mc146818rtc_regs.h
index ccdee42..6ede6c8 100644
--- a/include/hw/timer/mc146818rtc_regs.h
+++ b/include/hw/timer/mc146818rtc_regs.h
@@ -21,8 +21,9 @@ 
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#ifndef RTC_REGS_H
-#define RTC_REGS_H
+
+#ifndef MC146818RTC_REGS_H
+#define MC146818RTC_REGS_H
 
 #define RTC_ISA_IRQ 8
 
diff --git a/include/hw/tricore/tricore.h b/include/hw/tricore/tricore.h
index 5f13252..89ef922 100644
--- a/include/hw/tricore/tricore.h
+++ b/include/hw/tricore/tricore.h
@@ -1,5 +1,5 @@ 
-#ifndef TRICORE_MISC_H
-#define TRICORE_MISC_H 1
+#ifndef HW_TRICORE_H
+#define HW_TRICORE_H
 
 #include "exec/memory.h"
 #include "hw/irq.h"
diff --git a/include/hw/vfio/vfio.h b/include/hw/vfio/vfio.h
index f27d599..86248f5 100644
--- a/include/hw/vfio/vfio.h
+++ b/include/hw/vfio/vfio.h
@@ -1,5 +1,5 @@ 
-#ifndef VFIO_API_H
-#define VFIO_API_H
+#ifndef HW_VFIO_H
+#define HW_VFIO_H
 
 bool vfio_eeh_as_ok(AddressSpace *as);
 int vfio_eeh_as_op(AddressSpace *as, uint32_t op);
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 89f4879..ff56e29 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -11,8 +11,8 @@ 
  * See the COPYING file in the top-level directory.
  */
 
-#ifndef _QEMU_VIRTIO_VGA_H
-#define _QEMU_VIRTIO_VGA_H
+#ifndef HW_VIRTIO_GPU_H
+#define HW_VIRTIO_GPU_H
 
 #include "qemu/queue.h"
 #include "ui/qemu-pixman.h"
diff --git a/include/libdecnumber/decNumberLocal.h b/include/libdecnumber/decNumberLocal.h
index 94fb512..c4d4015 100644
--- a/include/libdecnumber/decNumberLocal.h
+++ b/include/libdecnumber/decNumberLocal.h
@@ -37,8 +37,9 @@ 
 /* decNumber.h or one of decDouble (etc.) must be included first.     */
 /* ------------------------------------------------------------------ */
 
-#if !defined(DECNUMBERLOC)
-  #define DECNUMBERLOC
+#ifndef DECNUMBERLOCAL_H
+#define DECNUMBERLOCAL_H
+
   #define DECVERSION	"decNumber 3.53" /* Package Version [16 max.] */
   #define DECNLAUTHOR	"Mike Cowlishaw"	      /* Who to blame */
 
diff --git a/include/migration/block.h b/include/migration/block.h
index ffa8ac0..41a1ac8 100644
--- a/include/migration/block.h
+++ b/include/migration/block.h
@@ -11,8 +11,8 @@ 
  *
  */
 
-#ifndef BLOCK_MIGRATION_H
-#define BLOCK_MIGRATION_H
+#ifndef MIGRATION_BLOCK_H
+#define MIGRATION_BLOCK_H
 
 void blk_mig_init(void);
 int blk_mig_active(void);
@@ -20,4 +20,4 @@  uint64_t blk_mig_bytes_transferred(void);
 uint64_t blk_mig_bytes_remaining(void);
 uint64_t blk_mig_bytes_total(void);
 
-#endif /* BLOCK_MIGRATION_H */
+#endif /* MIGRATION_BLOCK_H */
diff --git a/include/monitor/hmp-target.h b/include/monitor/hmp-target.h
index bc2c9c0..454e8ed 100644
--- a/include/monitor/hmp-target.h
+++ b/include/monitor/hmp-target.h
@@ -21,8 +21,9 @@ 
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  * THE SOFTWARE.
  */
-#ifndef MONITOR_COMMON_H
-#define MONITOR_COMMON_H
+
+#ifndef MONITOR_HMP_TARGET_H
+#define MONITOR_HMP_TARGET_H
 
 #define MD_TLONG 0
 #define MD_I32   1
@@ -46,4 +47,4 @@  void hmp_mce(Monitor *mon, const QDict *qdict);
 void hmp_info_local_apic(Monitor *mon, const QDict *qdict);
 void hmp_info_io_apic(Monitor *mon, const QDict *qdict);
 
-#endif /* MONITOR_COMMON */
+#endif /* MONITOR_HMP_TARGET_H */
diff --git a/include/monitor/qdev.h b/include/monitor/qdev.h
index c4b8a05..8e504bc 100644
--- a/include/monitor/qdev.h
+++ b/include/monitor/qdev.h
@@ -1,5 +1,5 @@ 
-#ifndef QEMU_QDEV_MONITOR_H
-#define QEMU_QDEV_MONITOR_H
+#ifndef MONITOR_QDEV_H
+#define MONITOR_QDEV_H
 
 #include "hw/qdev-core.h"
 
diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h
index 5609946..48c11b6 100644
--- a/include/qapi/qmp/dispatch.h
+++ b/include/qapi/qmp/dispatch.h
@@ -11,8 +11,8 @@ 
  *
  */
 
-#ifndef QMP_CORE_H
-#define QMP_CORE_H
+#ifndef QAPI_QMP_DISPATCH_H
+#define QAPI_QMP_DISPATCH_H
 
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qdict.h"
@@ -48,4 +48,3 @@  typedef void (*qmp_cmd_callback_fn)(QmpCommand *cmd, void *opaque);
 void qmp_for_each_command(qmp_cmd_callback_fn fn, void *opaque);
 
 #endif
-
diff --git a/include/qapi/qmp/types.h b/include/qapi/qmp/types.h
index 7782ec5..82de061 100644
--- a/include/qapi/qmp/types.h
+++ b/include/qapi/qmp/types.h
@@ -10,8 +10,8 @@ 
  * See the COPYING.LIB file in the top-level directory.
  */
 
-#ifndef QEMU_OBJECTS_H
-#define QEMU_OBJECTS_H
+#ifndef QAPI_QMP_TYPES_H
+#define QAPI_QMP_TYPES_H
 
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qint.h"
@@ -22,4 +22,4 @@ 
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qjson.h"
 
-#endif /* QEMU_OBJECTS_H */
+#endif /* QAPI_QMP_TYPES_H */
diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h
index 4d12167..0f7a8c1 100644
--- a/include/qapi/visitor.h
+++ b/include/qapi/visitor.h
@@ -11,8 +11,9 @@ 
  * See the COPYING.LIB file in the top-level directory.
  *
  */
-#ifndef QAPI_VISITOR_CORE_H
-#define QAPI_VISITOR_CORE_H
+
+#ifndef QAPI_VISITOR_H
+#define QAPI_VISITOR_H
 
 #include "qapi/qmp/qobject.h"
 
diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h
index 3b8ecb0..10d7c3b 100644
--- a/include/qemu/config-file.h
+++ b/include/qemu/config-file.h
@@ -1,5 +1,5 @@ 
-#ifndef QEMU_CONFIG_H
-#define QEMU_CONFIG_H
+#ifndef QEMU_CONFIG_FILE_H
+#define QEMU_CONFIG_FILE_H
 
 #include "qemu/option.h"
 #include "qapi/qmp/qdict.h"
@@ -28,4 +28,4 @@  void qemu_config_parse_qdict(QDict *options, QemuOptsList **lists,
  */
 int qemu_read_default_config_files(bool userconfig);
 
-#endif /* QEMU_CONFIG_H */
+#endif /* QEMU_CONFIG_FILE_H */
diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h
index 7a2a363..499ec8b 100644
--- a/include/qemu/error-report.h
+++ b/include/qemu/error-report.h
@@ -10,9 +10,8 @@ 
  * See the COPYING file in the top-level directory.
  */
 
-#ifndef QEMU_ERROR_H
-#define QEMU_ERROR_H
-
+#ifndef QEMU_ERROR_REPORT_H
+#define QEMU_ERROR_REPORT_H
 
 typedef struct Location {
     /* all members are private to qemu-error.c */
diff --git a/include/qemu/fifo8.h b/include/qemu/fifo8.h
index 8820780..24b3644 100644
--- a/include/qemu/fifo8.h
+++ b/include/qemu/fifo8.h
@@ -1,5 +1,5 @@ 
-#ifndef FIFO_H
-#define FIFO_H
+#ifndef QEMU_FIFO8_H
+#define QEMU_FIFO8_H
 
 #include "migration/vmstate.h"
 
@@ -157,4 +157,4 @@  extern const VMStateDescription vmstate_fifo8;
     .offset     = vmstate_offset_value(_state, _field, Fifo8),       \
 }
 
-#endif /* FIFO_H */
+#endif /* QEMU_FIFO8_H */
diff --git a/include/qemu/option.h b/include/qemu/option.h
index 8542d2d..1f9e3f9 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -23,8 +23,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef QEMU_OPTIONS_H
-#define QEMU_OPTIONS_H
+#ifndef QEMU_OPTION_H
+#define QEMU_OPTION_H
 
 #include "qemu/queue.h"
 #include "qapi/qmp/qdict.h"
diff --git a/include/qemu/option_int.h b/include/qemu/option_int.h
index 6432c1a..26b1d9e 100644
--- a/include/qemu/option_int.h
+++ b/include/qemu/option_int.h
@@ -23,8 +23,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef QEMU_OPTIONS_INTERNAL_H
-#define QEMU_OPTIONS_INTERNAL_H
+#ifndef QEMU_OPTION_INT_H
+#define QEMU_OPTION_INT_H
 
 #include "qemu/option.h"
 #include "qemu/error-report.h"
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 3a1a887..6e6d8e0 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -1,6 +1,7 @@ 
 /* headers to use the BSD sockets */
-#ifndef QEMU_SOCKET_H
-#define QEMU_SOCKET_H
+
+#ifndef QEMU_SOCKETS_H
+#define QEMU_SOCKETS_H
 
 #ifdef _WIN32
 
@@ -124,4 +125,4 @@  void qapi_copy_SocketAddress(SocketAddress **p_dest,
  * Returns: the socket address in string format, or NULL on error
  */
 char *socket_address_to_string(struct SocketAddress *addr, Error **errp);
-#endif /* QEMU_SOCKET_H */
\ No newline at end of file
+#endif /* QEMU_SOCKETS_H */
diff --git a/include/sysemu/bt.h b/include/sysemu/bt.h
index 2bc6d53..ddb05cd 100644
--- a/include/sysemu/bt.h
+++ b/include/sysemu/bt.h
@@ -1,5 +1,5 @@ 
-#ifndef BT_HOST_H
-#define BT_HOST_H
+#ifndef SYSEMU_BT_H
+#define SYSEMU_BT_H
 
 /* BT HCI info */
 
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h
index 4d6617e..9bc2e70 100644
--- a/include/sysemu/hostmem.h
+++ b/include/sysemu/hostmem.h
@@ -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 QEMU_RAM_H
-#define QEMU_RAM_H
+
+#ifndef SYSEMU_HOSTMEM_H
+#define SYSEMU_HOSTMEM_H
 
 #include "sysemu/sysemu.h" /* for MAX_NODES */
 #include "qom/object.h"
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index e3ec800..b58f52d 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -10,8 +10,8 @@ 
  * See the COPYING file in the top-level directory.
  */
 
-#ifndef _QEMU_TPM_H
-#define _QEMU_TPM_H
+#ifndef TPM_BACKEND_H
+#define TPM_BACKEND_H
 
 #include "qom/object.h"
 #include "qemu-common.h"
diff --git a/include/sysemu/tpm_backend_int.h b/include/sysemu/tpm_backend_int.h
index cc0dcb3..00639dd 100644
--- a/include/sysemu/tpm_backend_int.h
+++ b/include/sysemu/tpm_backend_int.h
@@ -19,9 +19,8 @@ 
  * License along with this library; if not, see <http://www.gnu.org/licenses/>
  */
 
-#ifndef TPM_TPM_BACKEND_H
-#define TPM_TPM_BACKEND_H
-
+#ifndef TPM_BACKEND_INT_H
+#define TPM_BACKEND_INT_H
 
 typedef struct TPMBackendThread {
     GThreadPool *pool;
@@ -39,4 +38,4 @@  typedef enum TPMBackendCmd {
     TPM_BACKEND_CMD_TPM_RESET,
 } TPMBackendCmd;
 
-#endif /* TPM_TPM_BACKEND_H */
+#endif /* TPM_BACKEND_INT_H */
diff --git a/net/tap_int.h b/net/tap_int.h
index 2378021..ae6888f 100644
--- a/net/tap_int.h
+++ b/net/tap_int.h
@@ -23,8 +23,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef QEMU_TAP_H
-#define QEMU_TAP_H
+#ifndef NET_TAP_INT_H
+#define NET_TAP_INT_H
 
 #include "qemu-common.h"
 #include "qapi-types.h"
@@ -46,4 +46,4 @@  int tap_fd_enable(int fd);
 int tap_fd_disable(int fd);
 int tap_fd_get_ifname(int fd, char *ifname);
 
-#endif /* QEMU_TAP_H */
+#endif /* NET_TAP_INT_H */
diff --git a/qga/service-win32.h b/qga/service-win32.h
index 3b9e870..89e99df 100644
--- a/qga/service-win32.h
+++ b/qga/service-win32.h
@@ -10,8 +10,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 QGA_SERVICE_H
-#define QGA_SERVICE_H
+
+#ifndef QGA_SERVICE_WIN32_H
+#define QGA_SERVICE_WIN32_H
 
 #include <windows.h>
 
diff --git a/qga/vss-win32/vss-common.h b/qga/vss-win32/vss-common.h
index 1ffde0f..c81a856 100644
--- a/qga/vss-win32/vss-common.h
+++ b/qga/vss-win32/vss-common.h
@@ -10,8 +10,8 @@ 
  * See the COPYING file in the top-level directory.
  */
 
-#ifndef VSS_WIN32_H
-#define VSS_WIN32_H
+#ifndef VSS_COMMON_H
+#define VSS_COMMON_H
 
 #define __MIDL_user_allocate_free_DEFINED__
 #include <windows.h>
diff --git a/slirp/ip6_icmp.h b/slirp/ip6_icmp.h
index 9460bf8..62ea1c2 100644
--- a/slirp/ip6_icmp.h
+++ b/slirp/ip6_icmp.h
@@ -3,8 +3,8 @@ 
  * Guillaume Subiron, Yann Bordenave, Serigne Modou Wagne.
  */
 
-#ifndef SLIRP_NETINET_ICMP6_H_
-#define SLIRP_NETINET_ICMP6_H_
+#ifndef SLIRP_IP6_ICMP_H
+#define SLIRP_IP6_ICMP_H
 
 /*
  * Interface Control Message Protocol version 6 Definitions.
diff --git a/slirp/slirp.h b/slirp/slirp.h
index e3641f9..624a850 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -1,5 +1,5 @@ 
-#ifndef __COMMON_H__
-#define __COMMON_H__
+#ifndef SLIRP_H
+#define SLIRP_H
 
 #include "qemu/host-utils.h"
 #include "slirp_config.h"
diff --git a/target-i386/hyperv.h b/target-i386/hyperv.h
index b26201f..0c3b562 100644
--- a/target-i386/hyperv.h
+++ b/target-i386/hyperv.h
@@ -11,8 +11,8 @@ 
  *
  */
 
-#ifndef HYPERV_I386_H
-#define HYPERV_I386_H
+#ifndef TARGET_I386_HYPERV_H
+#define TARGET_I386_HYPERV_H
 
 #include "cpu.h"
 #include "sysemu/kvm.h"
diff --git a/target-openrisc/exception.h b/target-openrisc/exception.h
index 4b64430..4ec56b4 100644
--- a/target-openrisc/exception.h
+++ b/target-openrisc/exception.h
@@ -17,12 +17,12 @@ 
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef QEMU_OPENRISC_EXCP_H
-#define QEMU_OPENRISC_EXCP_H
+#ifndef TARGET_OPENRISC_EXCEPTION_H
+#define TARGET_OPENRISC_EXCEPTION_H
 
 #include "cpu.h"
 #include "qemu-common.h"
 
 void QEMU_NORETURN raise_exception(OpenRISCCPU *cpu, uint32_t excp);
 
-#endif /* QEMU_OPENRISC_EXCP_H */
+#endif /* TARGET_OPENRISC_EXCEPTION_H */
diff --git a/target-tilegx/opcode_tilegx.h b/target-tilegx/opcode_tilegx.h
index 989436d..55376be 100644
--- a/target-tilegx/opcode_tilegx.h
+++ b/target-tilegx/opcode_tilegx.h
@@ -18,8 +18,8 @@ 
  *
  */
 
-#ifndef __ARCH_OPCODE_H__
-#define __ARCH_OPCODE_H__
+#ifndef OPCODE_TILEGX_H
+#define OPCODE_TILEGX_H
 
 #ifndef __ASSEMBLER__
 
@@ -1403,4 +1403,4 @@  enum
 
 #endif /* __ASSEMBLER__ */
 
-#endif /* __ARCH_OPCODE_H__ */
+#endif /* OPCODE_TILEGX_H */
diff --git a/target-xtensa/core-dc232b/core-isa.h b/target-xtensa/core-dc232b/core-isa.h
index 69f1065..a9935b8 100644
--- a/target-xtensa/core-dc232b/core-isa.h
+++ b/target-xtensa/core-dc232b/core-isa.h
@@ -8,9 +8,8 @@ 
  * Copyright (c) 1999-2007 Tensilica Inc.
  */
 
-#ifndef _XTENSA_CORE_CONFIGURATION_H
-#define _XTENSA_CORE_CONFIGURATION_H
-
+#ifndef XTENSA_DC232B_CORE_ISA_H
+#define XTENSA_DC232B_CORE_ISA_H
 
 /****************************************************************************
             Parameters Useful for Any Code, USER or PRIVILEGED
@@ -420,4 +419,4 @@ 
 #endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
 
 
-#endif /* _XTENSA_CORE_CONFIGURATION_H */
+#endif /* XTENSA_DC232B_CORE_ISA_H */
diff --git a/target-xtensa/core-dc233c/core-isa.h b/target-xtensa/core-dc233c/core-isa.h
index e82c3cb..ff92b7f 100644
--- a/target-xtensa/core-dc233c/core-isa.h
+++ b/target-xtensa/core-dc233c/core-isa.h
@@ -28,9 +28,8 @@ 
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
 
-#ifndef _XTENSA_CORE_CONFIGURATION_H
-#define _XTENSA_CORE_CONFIGURATION_H
-
+#ifndef XTENSA_DC233C_CORE_ISA_H
+#define XTENSA_DC233C_CORE_ISA_H
 
 /****************************************************************************
             Parameters Useful for Any Code, USER or PRIVILEGED
@@ -471,4 +470,4 @@  usable for an MMU-based OS */
 #endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
 
 
-#endif /* _XTENSA_CORE_CONFIGURATION_H */
+#endif /* XTENSA_DC233C_CORE_ISA_H */
diff --git a/target-xtensa/core-fsf/core-isa.h b/target-xtensa/core-fsf/core-isa.h
index b519d6c..fb2bb8f 100644
--- a/target-xtensa/core-fsf/core-isa.h
+++ b/target-xtensa/core-fsf/core-isa.h
@@ -8,9 +8,8 @@ 
  * Copyright (C) 1999-2006 Tensilica Inc.
  */
 
-#ifndef _XTENSA_CORE_H
-#define _XTENSA_CORE_H
-
+#ifndef XTENSA_FSF_CORE_ISA_H
+#define XTENSA_FSF_CORE_ISA_H
 
 /****************************************************************************
             Parameters Useful for Any Code, USER or PRIVILEGED
@@ -358,4 +357,4 @@ 
 #endif /* !XTENSA_HAL_NON_PRIVILEGED_ONLY */
 
 
-#endif /* _XTENSA_CORE_CONFIGURATION_H */
+#endif /* XTENSA_FSF_CORE_ISA_H */
diff --git a/ui/vnc-enc-tight.h b/ui/vnc-enc-tight.h
index a3add78..95c3dac 100644
--- a/ui/vnc-enc-tight.h
+++ b/ui/vnc-enc-tight.h
@@ -27,8 +27,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef VNC_ENCODING_TIGHT_H
-#define VNC_ENCODING_TIGHT_H
+#ifndef VNC_ENC_TIGHT_H
+#define VNC_ENC_TIGHT_H
 
 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  * Tight Encoding.
@@ -180,4 +180,4 @@ 
 #define VNC_TIGHT_DETECT_MIN_WIDTH           8
 #define VNC_TIGHT_DETECT_MIN_HEIGHT          8
 
-#endif /* VNC_ENCODING_TIGHT_H */
+#endif /* VNC_ENC_TIGHT_H */
diff --git a/ui/vnc-enc-zrle.h b/ui/vnc-enc-zrle.h
index 6b18213..6535cb2 100644
--- a/ui/vnc-enc-zrle.h
+++ b/ui/vnc-enc-zrle.h
@@ -26,8 +26,8 @@ 
  * THE SOFTWARE.
  */
 
-#ifndef VNC_ENCODING_ZRLE_H
-#define VNC_ENCODING_ZRLE_H
+#ifndef VNC_ENC_ZRLE_H
+#define VNC_ENC_ZRLE_H
 
 /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  * ZRLE - encoding combining Zlib compression, tiling, palettisation and
diff --git a/ui/vnc-enc-zywrle.h b/ui/vnc-enc-zywrle.h
index d436d58..610bd79 100644
--- a/ui/vnc-enc-zywrle.h
+++ b/ui/vnc-enc-zywrle.h
@@ -41,8 +41,8 @@  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  ********************************************************************/
 
-#ifndef VNC_ENCODING_ZYWRLE_H
-#define VNC_ENCODING_ZYWRLE_H
+#ifndef VNC_ENC_ZYWRLE_H
+#define VNC_ENC_ZYWRLE_H
 
 /* Tables for Coefficients filtering. */
 #ifndef ZYWRLE_QUANTIZE