[coreboot-gerrit] Change in coreboot[master]: src/arch: Add guards on all header files
Martin Roth (Code Review)
gerrit at coreboot.org
Mon Jul 24 05:15:51 CEST 2017
Martin Roth has uploaded this change for review. ( https://review.coreboot.org/20733
Change subject: src/arch: Add guards on all header files
......................................................................
src/arch: Add guards on all header files
Change-Id: I45ddb1ab6000016cc31ffc16be729d1245f208a3
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/arch/arm/include/clocks.h
M src/arch/arm64/include/clocks.h
M src/arch/mips/include/arch/bootblock_common.h
M src/arch/power8/include/arch/hlt.h
M src/arch/riscv/include/arch/hlt.h
M src/arch/x86/include/arch/bootblock_romcc.h
6 files changed, 30 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/33/20733/1
diff --git a/src/arch/arm/include/clocks.h b/src/arch/arm/include/clocks.h
index 60afb44..a846d42 100644
--- a/src/arch/arm/include/clocks.h
+++ b/src/arch/arm/include/clocks.h
@@ -26,6 +26,10 @@
*
* Please order the items by increasing Hz
*/
+
+#ifndef __ARCH_ARM_CLOCKS_H__
+#define __ARCH_ARM_CLOCKS_H__
+
enum {
CLK_32768 = 32768,
CLK_20M = 20000000,
@@ -34,3 +38,5 @@
CLK_216M = 216000000,
CLK_300M = 300000000,
};
+
+#endif
diff --git a/src/arch/arm64/include/clocks.h b/src/arch/arm64/include/clocks.h
index 60afb44..91e6730 100644
--- a/src/arch/arm64/include/clocks.h
+++ b/src/arch/arm64/include/clocks.h
@@ -26,6 +26,10 @@
*
* Please order the items by increasing Hz
*/
+
+ #ifndef __ARCH_ARM64_CLOCKS_H__
+ #define __ARCH_ARM64_CLOCKS_H__
+
enum {
CLK_32768 = 32768,
CLK_20M = 20000000,
@@ -34,3 +38,5 @@
CLK_216M = 216000000,
CLK_300M = 300000000,
};
+
+#endif
diff --git a/src/arch/mips/include/arch/bootblock_common.h b/src/arch/mips/include/arch/bootblock_common.h
index f5c11ba..8ad5a06 100644
--- a/src/arch/mips/include/arch/bootblock_common.h
+++ b/src/arch/mips/include/arch/bootblock_common.h
@@ -13,6 +13,9 @@
* GNU General Public License for more details.
*/
+#ifndef __BOOTBLOCK_COMMON_H__
+#define __BOOTBLOCK_COMMON_H__
+
#ifdef CONFIG_BOOTBLOCK_CPU_INIT
#include CONFIG_BOOTBLOCK_CPU_INIT
#endif
@@ -24,3 +27,4 @@
{
}
#endif
+#endif /* __BOOTBLOCK_COMMON_H__ */
diff --git a/src/arch/power8/include/arch/hlt.h b/src/arch/power8/include/arch/hlt.h
index 0fa910b..cfbf51e 100644
--- a/src/arch/power8/include/arch/hlt.h
+++ b/src/arch/power8/include/arch/hlt.h
@@ -11,8 +11,13 @@
* GNU General Public License for more details.
*/
+#ifndef __ARCH_POWER8_HLT_H__
+#define __ARCH_POWER8_HLT_H__
+
static inline __attribute__((always_inline)) void hlt(void)
{
while (1)
;
}
+
+#endif
diff --git a/src/arch/riscv/include/arch/hlt.h b/src/arch/riscv/include/arch/hlt.h
index da02778..47e73aa 100644
--- a/src/arch/riscv/include/arch/hlt.h
+++ b/src/arch/riscv/include/arch/hlt.h
@@ -11,7 +11,12 @@
* GNU General Public License for more details.
*/
+ #ifndef __ARCH_RISCV_HLT_H__
+ #define __ARCH_RISCV_HLT_H__
+
static inline __attribute__((always_inline)) void hlt(void)
{
while (1);
}
+
+#endif
diff --git a/src/arch/x86/include/arch/bootblock_romcc.h b/src/arch/x86/include/arch/bootblock_romcc.h
index 600d360..51f22b0 100644
--- a/src/arch/x86/include/arch/bootblock_romcc.h
+++ b/src/arch/x86/include/arch/bootblock_romcc.h
@@ -11,6 +11,9 @@
* GNU General Public License for more details.
*/
+#ifndef __BOOTBLOCK_ROMCC_H__
+#define __BOOTBLOCK_ROMCC_H__
+
#include <arch/cbfs.h>
#include <cpu/x86/lapic/boot_cpu.c>
#include <pc80/mc146818rtc.h>
@@ -63,3 +66,4 @@
}
}
#endif
+#endif /* __BOOTBLOCK_ROMCC_H__ */
--
To view, visit https://review.coreboot.org/20733
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I45ddb1ab6000016cc31ffc16be729d1245f208a3
Gerrit-Change-Number: 20733
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170724/6db858fc/attachment.html>
More information about the coreboot-gerrit
mailing list