Switch from include guard to pragma once.

This pragma is so widley supported it is a defacto standard. It has the
advantage over include guards in that a unique macro identifier does not
need to be created and maintained.

Change-Id: Id12f56d9970fdfb63d45c92e428d3dbe44b2ab0e
diff --git a/inc/hf/addr.h b/inc/hf/addr.h
index 1d4ec39..14e21c0 100644
--- a/inc/hf/addr.h
+++ b/inc/hf/addr.h
@@ -1,5 +1,4 @@
-#ifndef _ADDR_H
-#define _ADDR_H
+#pragma once
 
 #include <stddef.h>
 #include <stdint.h>
@@ -118,5 +117,3 @@
 {
 	return (void *)va_addr(va);
 }
-
-#endif /* _ADDR_H */
diff --git a/inc/hf/alloc.h b/inc/hf/alloc.h
index 4570b1a..ea90821 100644
--- a/inc/hf/alloc.h
+++ b/inc/hf/alloc.h
@@ -1,5 +1,4 @@
-#ifndef _ALLOC_H
-#define _ALLOC_H
+#pragma once
 
 #include <stddef.h>
 
@@ -8,5 +7,3 @@
 void hfree(void *ptr);
 void *halloc_aligned(size_t size, size_t align);
 void *halloc_aligned_nosync(size_t size, size_t align);
-
-#endif /* _ALLOC_H */
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 0009ac8..934404d 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -1,5 +1,4 @@
-#ifndef _API_H
-#define _API_H
+#pragma once
 
 #include "hf/cpu.h"
 #include "hf/vm.h"
@@ -22,5 +21,3 @@
 int32_t api_rpc_read_request(bool block, struct vcpu **next);
 int32_t api_rpc_reply(size_t size, bool ack, struct vcpu **next);
 int32_t api_rpc_ack(void);
-
-#endif /* _API_H */
diff --git a/inc/hf/arch.h b/inc/hf/arch.h
index fcdead1..860bbea 100644
--- a/inc/hf/arch.h
+++ b/inc/hf/arch.h
@@ -1,8 +1,5 @@
-#ifndef _ARCH_H
-#define _ARCH_H
+#pragma once
 
 #include "hf/cpu.h"
 
 void arch_putchar(char c);
-
-#endif /* _ARCH_H */
diff --git a/inc/hf/boot_params.h b/inc/hf/boot_params.h
index 4841654..f338e84 100644
--- a/inc/hf/boot_params.h
+++ b/inc/hf/boot_params.h
@@ -1,5 +1,4 @@
-#ifndef _BOOT_PARAMS_H
-#define _BOOT_PARAMS_H
+#pragma once
 
 #include <stdbool.h>
 
@@ -22,5 +21,3 @@
 
 bool plat_get_boot_params(struct boot_params *p);
 bool plat_update_boot_params(struct boot_params_update *p);
-
-#endif /* _BOOT_PARAMS_H */
diff --git a/inc/hf/cpio.h b/inc/hf/cpio.h
index de33ba6..55548c9 100644
--- a/inc/hf/cpio.h
+++ b/inc/hf/cpio.h
@@ -1,5 +1,4 @@
-#ifndef _CPIO_H
-#define _CPIO_H
+#pragma once
 
 #include <stdbool.h>
 #include <stddef.h>
@@ -8,5 +7,3 @@
 
 bool cpio_next(struct memiter *iter, const char **name, const void **contents,
 	       size_t *size);
-
-#endif /* _CPIO_H */
diff --git a/inc/hf/cpu.h b/inc/hf/cpu.h
index a779679..b263e39 100644
--- a/inc/hf/cpu.h
+++ b/inc/hf/cpu.h
@@ -1,5 +1,4 @@
-#ifndef _CPU_H
-#define _CPU_H
+#pragma once
 
 #include <stdbool.h>
 #include <stddef.h>
@@ -61,5 +60,3 @@
 void vcpu_init(struct vcpu *vcpu, struct vm *vm);
 void vcpu_on(struct vcpu *vcpu);
 void vcpu_off(struct vcpu *vcpu);
-
-#endif /* _CPU_H */
diff --git a/inc/hf/decl_offsets.h b/inc/hf/decl_offsets.h
index ede3ad7..258d6c6 100644
--- a/inc/hf/decl_offsets.h
+++ b/inc/hf/decl_offsets.h
@@ -1,5 +1,4 @@
-#ifndef _DECL_OFFSETS_H
-#define _DECL_OFFSETS_H
+#pragma once
 
 #ifdef GEN_OFFSETS
 
@@ -31,5 +30,3 @@
 		      " and not" #actual)
 
 #endif /* GEN_OFFSETS */
-
-#endif /* _DECL_OFFSETS_H */
diff --git a/inc/hf/dlog.h b/inc/hf/dlog.h
index 1d514a3..0b07587 100644
--- a/inc/hf/dlog.h
+++ b/inc/hf/dlog.h
@@ -1,5 +1,4 @@
-#ifndef _DLOG_H
-#define _DLOG_H
+#pragma once
 
 #include <stdarg.h>
 
@@ -10,5 +9,3 @@
 #define dlog(...)
 #define vdlog(fmt, args)
 #endif
-
-#endif /* _DLOG_H */
diff --git a/inc/hf/fdt.h b/inc/hf/fdt.h
index 147c0dc..bda1146 100644
--- a/inc/hf/fdt.h
+++ b/inc/hf/fdt.h
@@ -1,5 +1,4 @@
-#ifndef _FDT_H
-#define _FDT_H
+#pragma once
 
 #include <stdbool.h>
 #include <stddef.h>
@@ -24,5 +23,3 @@
 
 void fdt_add_mem_reservation(struct fdt_header *hdr, uint64_t addr,
 			     uint64_t len);
-
-#endif /* _FDT_H */
diff --git a/inc/hf/fdt_handler.h b/inc/hf/fdt_handler.h
index 4d3fa8f..d21c771 100644
--- a/inc/hf/fdt_handler.h
+++ b/inc/hf/fdt_handler.h
@@ -1,5 +1,4 @@
-#ifndef _FDT_HANDLER_H
-#define _FDT_HANDLER_H
+#pragma once
 
 #include "hf/boot_params.h"
 #include "hf/fdt.h"
@@ -7,5 +6,3 @@
 
 bool fdt_get_boot_params(paddr_t fdt_addr, struct boot_params *p);
 bool fdt_patch(paddr_t fdt_addr, struct boot_params_update *p);
-
-#endif /* _FDT_HANDLER_H */
diff --git a/inc/hf/load.h b/inc/hf/load.h
index ba67f38..5e4ead3 100644
--- a/inc/hf/load.h
+++ b/inc/hf/load.h
@@ -1,5 +1,4 @@
-#ifndef _LOAD_H
-#define _LOAD_H
+#pragma once
 
 #include <stddef.h>
 #include <stdint.h>
@@ -12,5 +11,3 @@
 		  struct memiter *initrd);
 bool load_secondary(const struct memiter *cpio, paddr_t mem_begin,
 		    paddr_t *mem_end);
-
-#endif /* _LOAD_H */
diff --git a/inc/hf/memiter.h b/inc/hf/memiter.h
index 9e066da..9cb9576 100644
--- a/inc/hf/memiter.h
+++ b/inc/hf/memiter.h
@@ -1,5 +1,4 @@
-#ifndef _MEMITER_H
-#define _MEMITER_H
+#pragma once
 
 #include <stdbool.h>
 #include <stddef.h>
@@ -15,5 +14,3 @@
 bool memiter_parse_str(struct memiter *it, struct memiter *str);
 bool memiter_iseq(const struct memiter *it, const char *str);
 bool memiter_advance(struct memiter *it, size_t v);
-
-#endif /* _MEMITER_H */
diff --git a/inc/hf/mm.h b/inc/hf/mm.h
index b62133c..c96e16a 100644
--- a/inc/hf/mm.h
+++ b/inc/hf/mm.h
@@ -1,5 +1,4 @@
-#ifndef _MM_H
-#define _MM_H
+#pragma once
 
 #include <stdbool.h>
 #include <stdint.h>
@@ -59,5 +58,3 @@
 void *mm_identity_map(paddr_t begin, paddr_t end, int mode);
 bool mm_unmap(paddr_t begin, paddr_t end, int mode);
 void mm_defrag(void);
-
-#endif /* _MM_H */
diff --git a/inc/hf/spinlock.h b/inc/hf/spinlock.h
index 1061fb3..646136c 100644
--- a/inc/hf/spinlock.h
+++ b/inc/hf/spinlock.h
@@ -1,5 +1,4 @@
-#ifndef _SPINLOCK_H
-#define _SPINLOCK_H
+#pragma once
 
 #include <stdatomic.h>
 
@@ -28,5 +27,3 @@
 {
 	atomic_flag_clear_explicit(&l->v, memory_order_release);
 }
-
-#endif /* _SPINLOCK_H */
diff --git a/inc/hf/std.h b/inc/hf/std.h
index d7cc124..e17f155 100644
--- a/inc/hf/std.h
+++ b/inc/hf/std.h
@@ -1,5 +1,4 @@
-#ifndef _STD_H
-#define _STD_H
+#pragma once
 
 #include <stddef.h>
 #include <stdint.h>
@@ -54,5 +53,3 @@
 #error "Unsupported byte order"
 
 #endif
-
-#endif /* STD_H */
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index ce88adc..47b1e2a 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -1,5 +1,4 @@
-#ifndef _VM_H
-#define _VM_H
+#pragma once
 
 #include "hf/cpu.h"
 #include "hf/mm.h"
@@ -29,5 +28,3 @@
 bool vm_init(struct vm *vm, uint32_t id, uint32_t vcpu_count);
 void vm_start_vcpu(struct vm *vm, size_t index, ipaddr_t entry, size_t arg);
 void vm_set_current(struct vm *vm);
-
-#endif /* _VM_H */