Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/armbru/tags/pull-include-2016-0…
Browse files Browse the repository at this point in the history
…7-12' into staging

Clean up #include "..." vs <...> and header guards

# gpg: Signature made Tue 12 Jul 2016 15:23:43 BST
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-include-2016-07-12:
  cris: Fix broken header guard in hw/cris/boot.h
  Clean up decorations and whitespace around header guards
  Clean up ill-advised or unusual header guards
  libdecnumber: Don't error out on decNumberLocal.h re-inclusion
  libdecnumber: Don't fool around with guards to avoid #include
  Clean up header guards that don't match their file name
  Drop Emacs local variables lists redundant with .dir-locals.el
  spapr_pci: Include spapr.h instead of playing games with #error
  tcg: Clean up tcg-target.h header guards
  linux-user: Fix broken header guard in syscall_defs.h
  linux-user: Clean up hostdep.h header guards
  linux-user: Clean up target_structs.h header guards
  linux-user: Clean up target_signal.h header guards
  linux-user: Clean up target_cpu.h header guards
  linux-user: Clean up target_syscall.h header guards
  target-*: Clean up cpu.h header guards
  scripts: New clean-header-guards.pl
  Use #include "..." for our own headers, <...> for others

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Jul 12, 2016
2 parents 7d820b7 + 82751a3 commit ca3d87d
Show file tree
Hide file tree
Showing 524 changed files with 1,418 additions and 1,226 deletions.
3 changes: 2 additions & 1 deletion audio/audio.h
Expand Up @@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef QEMU_AUDIO_H
#define QEMU_AUDIO_H

Expand Down Expand Up @@ -162,4 +163,4 @@ static inline void *advance (void *p, int incr)
int wav_start_capture (CaptureState *s, const char *path, int freq,
int bits, int nchannels);

#endif /* audio.h */
#endif /* QEMU_AUDIO_H */
3 changes: 2 additions & 1 deletion audio/audio_int.h
Expand Up @@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef QEMU_AUDIO_INT_H
#define QEMU_AUDIO_INT_H

Expand Down Expand Up @@ -257,4 +258,4 @@ static inline int audio_ring_dist (int dst, int src, int len)
#define AUDIO_FUNC __FILE__ ":" AUDIO_STRINGIFY (__LINE__)
#endif

#endif /* audio_int.h */
#endif /* QEMU_AUDIO_INT_H */
2 changes: 1 addition & 1 deletion audio/audio_pt_int.h
Expand Up @@ -19,4 +19,4 @@ int audio_pt_wait (struct audio_pt *, const char *);
int audio_pt_unlock_and_signal (struct audio_pt *, const char *);
int audio_pt_join (struct audio_pt *, void **, const char *);

#endif /* audio_pt_int.h */
#endif /* QEMU_AUDIO_PT_INT_H */
3 changes: 2 additions & 1 deletion audio/mixeng.h
Expand Up @@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/

#ifndef QEMU_MIXENG_H
#define QEMU_MIXENG_H

Expand Down Expand Up @@ -48,4 +49,4 @@ void st_rate_stop (void *opaque);
void mixeng_clear (struct st_sample *buf, int len);
void mixeng_volume (struct st_sample *buf, int len, struct mixeng_volume *vol);

#endif /* mixeng.h */
#endif /* QEMU_MIXENG_H */
1 change: 0 additions & 1 deletion block/iscsi.c
Expand Up @@ -46,7 +46,6 @@

#ifdef __linux__
#include <scsi/sg.h>
#include <block/scsi.h>
#endif

typedef struct IscsiLun {
Expand Down
2 changes: 1 addition & 1 deletion bsd-user/i386/target_syscall.h
Expand Up @@ -162,4 +162,4 @@ struct target_vm86plus_struct {

#define UNAME_MACHINE "i386"

#endif /* TARGET_SYSCALL_H */
#endif /* TARGET_SYSCALL_H */
2 changes: 1 addition & 1 deletion bsd-user/sparc/target_syscall.h
Expand Up @@ -11,4 +11,4 @@ struct target_pt_regs {

#define UNAME_MACHINE "sun4"

#endif /* TARGET_SYSCALL_H */
#endif /* TARGET_SYSCALL_H */
2 changes: 1 addition & 1 deletion bsd-user/sparc64/target_syscall.h
Expand Up @@ -12,4 +12,4 @@ struct target_pt_regs {

#define UNAME_MACHINE "sun4u"

#endif /* TARGET_SYSCALL_H */
#endif /* TARGET_SYSCALL_H */
2 changes: 1 addition & 1 deletion bsd-user/x86_64/target_syscall.h
Expand Up @@ -118,4 +118,4 @@ struct target_msqid64_ds {
#define TARGET_ARCH_GET_FS 0x1003
#define TARGET_ARCH_GET_GS 0x1004

#endif /* TARGET_SYSCALL_H */
#endif /* TARGET_SYSCALL_H */
6 changes: 3 additions & 3 deletions contrib/ivshmem-client/ivshmem-client.h
Expand Up @@ -6,8 +6,8 @@
* top-level directory.
*/

#ifndef _IVSHMEM_CLIENT_H_
#define _IVSHMEM_CLIENT_H_
#ifndef IVSHMEM_CLIENT_H
#define IVSHMEM_CLIENT_H

/**
* This file provides helper to implement an ivshmem client. It is used
Expand Down Expand Up @@ -209,4 +209,4 @@ ivshmem_client_search_peer(IvshmemClient *client, int64_t peer_id);
*/
void ivshmem_client_dump(const IvshmemClient *client);

#endif /* _IVSHMEM_CLIENT_H_ */
#endif /* IVSHMEM_CLIENT_H */
6 changes: 3 additions & 3 deletions contrib/ivshmem-server/ivshmem-server.h
Expand Up @@ -6,8 +6,8 @@
* top-level directory.
*/

#ifndef _IVSHMEM_SERVER_H_
#define _IVSHMEM_SERVER_H_
#ifndef IVSHMEM_SERVER_H
#define IVSHMEM_SERVER_H

/**
* The ivshmem server is a daemon that creates a unix socket in listen
Expand Down Expand Up @@ -163,4 +163,4 @@ ivshmem_server_search_peer(IvshmemServer *server, int64_t peer_id);
*/
void ivshmem_server_dump(const IvshmemServer *server);

#endif /* _IVSHMEM_SERVER_H_ */
#endif /* IVSHMEM_SERVER_H */
6 changes: 3 additions & 3 deletions crypto/block-luks.h
Expand Up @@ -18,11 +18,11 @@
*
*/

#ifndef QCRYPTO_BLOCK_LUKS_H__
#define QCRYPTO_BLOCK_LUKS_H__
#ifndef QCRYPTO_BLOCK_LUKS_H
#define QCRYPTO_BLOCK_LUKS_H

#include "crypto/blockpriv.h"

extern const QCryptoBlockDriver qcrypto_block_driver_luks;

#endif /* QCRYPTO_BLOCK_LUKS_H__ */
#endif /* QCRYPTO_BLOCK_LUKS_H */
6 changes: 3 additions & 3 deletions crypto/block-qcow.h
Expand Up @@ -18,11 +18,11 @@
*
*/

#ifndef QCRYPTO_BLOCK_QCOW_H__
#define QCRYPTO_BLOCK_QCOW_H__
#ifndef QCRYPTO_BLOCK_QCOW_H
#define QCRYPTO_BLOCK_QCOW_H

#include "crypto/blockpriv.h"

extern const QCryptoBlockDriver qcrypto_block_driver_qcow;

#endif /* QCRYPTO_BLOCK_QCOW_H__ */
#endif /* QCRYPTO_BLOCK_QCOW_H */
6 changes: 3 additions & 3 deletions crypto/blockpriv.h
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 */
2 changes: 1 addition & 1 deletion crypto/hash-gcrypt.c
Expand Up @@ -19,9 +19,9 @@
*/

#include "qemu/osdep.h"
#include <gcrypt.h>
#include "qapi/error.h"
#include "crypto/hash.h"
#include "gcrypt.h"


static int qcrypto_hash_alg_map[QCRYPTO_HASH_ALG__MAX] = {
Expand Down
6 changes: 3 additions & 3 deletions crypto/ivgenpriv.h
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 */
2 changes: 1 addition & 1 deletion crypto/pbkdf-gcrypt.c
Expand Up @@ -19,9 +19,9 @@
*/

#include "qemu/osdep.h"
#include <gcrypt.h>
#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "gcrypt.h"

bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash)
{
Expand Down
2 changes: 1 addition & 1 deletion crypto/pbkdf-nettle.c
Expand Up @@ -19,9 +19,9 @@
*/

#include "qemu/osdep.h"
#include <nettle/pbkdf2.h>
#include "qapi/error.h"
#include "crypto/pbkdf.h"
#include "nettle/pbkdf2.h"


bool qcrypto_pbkdf2_supports(QCryptoHashAlgorithm hash)
Expand Down
7 changes: 3 additions & 4 deletions crypto/tlscredspriv.h
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 */
2 changes: 1 addition & 1 deletion exec.c
Expand Up @@ -36,7 +36,7 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#if defined(CONFIG_USER_ONLY)
#include <qemu.h>
#include "qemu.h"
#else /* !CONFIG_USER_ONLY */
#include "hw/hw.h"
#include "exec/memory.h"
Expand Down
4 changes: 2 additions & 2 deletions fsdev/9p-iov-marshal.h
@@ -1,5 +1,5 @@
#ifndef _QEMU_9P_IOV_MARSHAL_H
#define _QEMU_9P_IOV_MARSHAL_H
#ifndef QEMU_9P_IOV_MARSHAL_H
#define QEMU_9P_IOV_MARSHAL_H

#include "9p-marshal.h"

Expand Down
4 changes: 2 additions & 2 deletions fsdev/9p-marshal.h
@@ -1,5 +1,5 @@
#ifndef _QEMU_9P_MARSHAL_H
#define _QEMU_9P_MARSHAL_H
#ifndef QEMU_9P_MARSHAL_H
#define QEMU_9P_MARSHAL_H

typedef struct V9fsString
{
Expand Down
6 changes: 4 additions & 2 deletions fsdev/file-op-9p.h
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
5 changes: 3 additions & 2 deletions hw/9pfs/9p-proxy.h
Expand Up @@ -9,8 +9,9 @@
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*/
#ifndef _QEMU_9P_PROXY_H
#define _QEMU_9P_PROXY_H

#ifndef QEMU_9P_PROXY_H
#define QEMU_9P_PROXY_H

#define PROXY_MAX_IO_SZ (64 * 1024)
#define V9FS_FD_VALID INT_MAX
Expand Down
4 changes: 2 additions & 2 deletions hw/9pfs/9p-synth.h
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
5 changes: 3 additions & 2 deletions hw/9pfs/9p-xattr.h
Expand Up @@ -10,8 +10,9 @@
* the COPYING file in the top-level directory.
*
*/
#ifndef _QEMU_9P_XATTR_H
#define _QEMU_9P_XATTR_H

#ifndef QEMU_9P_XATTR_H
#define QEMU_9P_XATTR_H

#include "qemu/xattr.h"

Expand Down
4 changes: 2 additions & 2 deletions hw/9pfs/9p.h
@@ -1,5 +1,5 @@
#ifndef _QEMU_9P_H
#define _QEMU_9P_H
#ifndef QEMU_9P_H
#define QEMU_9P_H

#include <dirent.h>
#include <utime.h>
Expand Down
4 changes: 2 additions & 2 deletions hw/9pfs/coth.h
Expand Up @@ -12,8 +12,8 @@
*
*/

#ifndef _QEMU_9P_COTH_H
#define _QEMU_9P_COTH_H
#ifndef QEMU_9P_COTH_H
#define QEMU_9P_COTH_H

#include "qemu/thread.h"
#include "qemu/coroutine.h"
Expand Down
4 changes: 2 additions & 2 deletions hw/9pfs/virtio-9p.h
@@ -1,5 +1,5 @@
#ifndef _QEMU_VIRTIO_9P_H
#define _QEMU_VIRTIO_9P_H
#ifndef QEMU_VIRTIO_9P_H
#define QEMU_VIRTIO_9P_H

#include "standard-headers/linux/virtio_9p.h"
#include "hw/virtio/virtio.h"
Expand Down
4 changes: 2 additions & 2 deletions 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"
Expand Down
4 changes: 2 additions & 2 deletions hw/arm/strongarm.h
@@ -1,5 +1,5 @@
#ifndef _STRONGARM_H
#define _STRONGARM_H
#ifndef STRONGARM_H
#define STRONGARM_H

#include "exec/memory.h"
#include "target-arm/cpu-qom.h"
Expand Down
4 changes: 2 additions & 2 deletions hw/audio/fmopl.h
@@ -1,5 +1,5 @@
#ifndef __FMOPL_H_
#define __FMOPL_H_
#ifndef FMOPL_H
#define FMOPL_H

/* --- select emulation chips --- */
#define BUILD_YM3812 (HAS_YM3812)
Expand Down
2 changes: 1 addition & 1 deletion hw/audio/gusemu.h
Expand Up @@ -101,4 +101,4 @@ void gus_irqgen(GUSEmuState *state, unsigned int elapsed_time);
/* lower values won´t provide any benefit at all, higher values can cause audible timing delays */
/* note: masked timers are also calculated by this function, thus it might be needed even without any IRQs in use! */

#endif /* gusemu.h */
#endif /* GUSEMU_H */
2 changes: 1 addition & 1 deletion hw/audio/gustate.h
Expand Up @@ -129,4 +129,4 @@

#define gusdataend (VSRegsEnd+4)

#endif /* gustate.h */
#endif /* GUSTATE_H */
2 changes: 1 addition & 1 deletion hw/audio/lm4549.h
Expand Up @@ -40,4 +40,4 @@ uint32_t lm4549_read(lm4549_state *s, hwaddr offset);
void lm4549_write(lm4549_state *s, hwaddr offset, uint32_t value);
uint32_t lm4549_write_samples(lm4549_state *s, uint32_t left, uint32_t right);

#endif /* #ifndef HW_LM4549_H */
#endif /* HW_LM4549_H */
2 changes: 1 addition & 1 deletion hw/audio/pl041.h
Expand Up @@ -132,4 +132,4 @@ enum {
#define RXTOFEC3 (1 << 11)
#define RXTOFEC4 (1 << 12)

#endif /* #ifndef HW_PL041_H */
#endif /* HW_PL041_H */
8 changes: 4 additions & 4 deletions hw/block/nvme.c
Expand Up @@ -21,10 +21,10 @@
*/

#include "qemu/osdep.h"
#include <hw/block/block.h>
#include <hw/hw.h>
#include <hw/pci/msix.h>
#include <hw/pci/pci.h>
#include "hw/block/block.h"
#include "hw/hw.h"
#include "hw/pci/msix.h"
#include "hw/pci/pci.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
Expand Down

0 comments on commit ca3d87d

Please sign in to comment.