[coreboot-gerrit] Change in coreboot[master]: src/include: Add guards on all header files

Martin Roth (Code Review) gerrit at coreboot.org
Mon Jul 24 05:15:59 CEST 2017


Martin Roth has uploaded this change for review. ( https://review.coreboot.org/20734


Change subject: src/include: Add guards on all header files
......................................................................

src/include: Add guards on all header files

Change-Id: I2d7d4e0b25f2cf3eef2040f89d5ebc711909cdd7
Signed-off-by: Martin Roth <martinroth at google.com>
---
M src/include/cpu/amd/model_10xxx_rev.h
M src/include/cpu/amd/model_fxx_rev.h
M src/include/cpu/amd/sc520.h
M src/include/cpu/x86/post_code.h
M src/include/device/pci_ids.h
M src/include/spd_ddr2.h
M src/include/sys/types.h
7 files changed, 32 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/20734/1

diff --git a/src/include/cpu/amd/model_10xxx_rev.h b/src/include/cpu/amd/model_10xxx_rev.h
index 7f07e98..c6fa8f6 100644
--- a/src/include/cpu/amd/model_10xxx_rev.h
+++ b/src/include/cpu/amd/model_10xxx_rev.h
@@ -13,8 +13,13 @@
  * GNU General Public License for more details.
  */
 
+#ifndef __CPU_AMD_MODEL_10XXX_REV_H__
+#define __CPU_AMD_MODEL_10XXX_REV_H__
+
 #include <arch/cpu.h>
 
 int init_processor_name(void);
 
 /* place holder for Family 10 revision code */
+
+#endif /* __CPU_AMD_MODEL_10XXX_REV_H__ */
diff --git a/src/include/cpu/amd/model_fxx_rev.h b/src/include/cpu/amd/model_fxx_rev.h
index 828e51a..6fb6194 100644
--- a/src/include/cpu/amd/model_fxx_rev.h
+++ b/src/include/cpu/amd/model_fxx_rev.h
@@ -1,3 +1,6 @@
+#ifndef __CPU_AMD_MODEL_FXX_REV_H__
+#define __CPU_AMD_MODEL_FXX_REV_H__
+
 #include <arch/cpu.h>
 #include <arch/io.h>
 
@@ -125,3 +128,4 @@
 int is_cpu_f0_in_bsp(int nodeid);
 
 #endif
+#endif /* __CPU_AMD_MODEL_FXX_REV_H__ */
diff --git a/src/include/cpu/amd/sc520.h b/src/include/cpu/amd/sc520.h
index 4e748be..5d72d69 100644
--- a/src/include/cpu/amd/sc520.h
+++ b/src/include/cpu/amd/sc520.h
@@ -1,4 +1,8 @@
 /* handy dandy stuff for the sc520 MMCR */
+
+#ifndef __CPU_AMD_SC520_H__
+#define __CPU_AMD_SC520_H__
+
 /* default location of the MMCR */
 #define MMCR 0xfffef000
 
@@ -309,3 +313,5 @@
 
 
 #define MMCRDEFAULT ((struct mmcr *) 0xfffef000)
+
+#endif /* __CPU_AMD_SC520_H__ */
diff --git a/src/include/cpu/x86/post_code.h b/src/include/cpu/x86/post_code.h
index cd3d159..76a415d 100644
--- a/src/include/cpu/x86/post_code.h
+++ b/src/include/cpu/x86/post_code.h
@@ -1,3 +1,5 @@
+#ifndef __X86_POST_CODE_H__
+#define __X86_POST_CODE_H__
 
 #include <console/post_codes.h>
 
@@ -10,3 +12,4 @@
 #else
 #define post_code(value)
 #endif
+#endif /* __X86_POST_CODE_H__ */
diff --git a/src/include/device/pci_ids.h b/src/include/device/pci_ids.h
index f89a6aa..323bc13 100644
--- a/src/include/device/pci_ids.h
+++ b/src/include/device/pci_ids.h
@@ -4,6 +4,9 @@
  *	Please keep sorted.
  */
 
+#ifndef __DEVICE_PCI_IDS_H__
+#define __DEVICE_PCI_IDS_H__
+
 /* Device classes and subclasses */
 
 #define PCI_CLASS_NOT_DEFINED		0x0000
@@ -3077,3 +3080,4 @@
 #define PCI_DEVICE_ID_AMD_VIPER_7412    0x7412
 
 /* END OLDER USAGE */
+#endif /* __DEVICE_PCI_IDS_H__ */
diff --git a/src/include/spd_ddr2.h b/src/include/spd_ddr2.h
index 848cc5d..724c996 100644
--- a/src/include/spd_ddr2.h
+++ b/src/include/spd_ddr2.h
@@ -14,6 +14,9 @@
  * GNU General Public License for more details.
  */
 
+#ifndef __SPD_DDR2_H__
+#define __SPD_DDR2_H__
+
 /* SPDs for DDR2 SDRAM */
 #define SPD_MEM_TYPE	2
 	#define SPD_MEM_TYPE_SDRAM_DDR	0x07
@@ -111,3 +114,5 @@
 #define SPD_TRFC	42
 
 #define SPD_TREF	12
+
+#endif /* __SPD_DDR2_H__ */
diff --git a/src/include/sys/types.h b/src/include/sys/types.h
index fa95d57..69968dd 100644
--- a/src/include/sys/types.h
+++ b/src/include/sys/types.h
@@ -1 +1,6 @@
+#ifndef __SYS_TYPES_H__
+#define __SYS_TYPES_H__
+
 #include "../types.h"
+
+#endif /* __SYS_TYPES_H__ */

-- 
To view, visit https://review.coreboot.org/20734
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d7d4e0b25f2cf3eef2040f89d5ebc711909cdd7
Gerrit-Change-Number: 20734
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/31eca2ba/attachment.html>


More information about the coreboot-gerrit mailing list