Patrick Georgi merged this change.

View Change

Approvals: build bot (Jenkins): Verified Lijian Zhao: Looks good to me, approved
src/{include,arch,cpu,lib}: Add missing 'include <types.h>'

<types.h> is supposed to provide <stdint.h> and <stddef.h>.
So when <types.h> is included, <stdint.h> and/or <stddef.h> is removed.

Change-Id: I57aead27806e307b9827fc7ee2cd663f12ee6e5e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31892
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
---
M src/arch/x86/include/arch/acpi.h
M src/cpu/allwinner/a10/twi.c
M src/cpu/amd/family_10h-family_15h/init_cpus.c
M src/cpu/amd/family_10h-family_15h/powernow_acpi.c
M src/include/types.h
M src/lib/lzmadecode.c
6 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index 60efdd0..dbf46a9 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -56,11 +56,11 @@
#define OEM_ID "COREv4" /* Must be exactly 6 bytes long! */

#if !defined(__ASSEMBLER__) && !defined(__ACPI__) && !defined(__ROMCC__)
-#include <stdint.h>
#include <commonlib/helpers.h>
#include <device/device.h>
#include <uuid.h>
#include <cper.h>
+#include <types.h>

#define RSDP_SIG "RSD PTR " /* RSDT pointer signature */
#define ASLC "CORE" /* Must be exactly 4 bytes long! */
diff --git a/src/cpu/allwinner/a10/twi.c b/src/cpu/allwinner/a10/twi.c
index 6e7f9e2..01ee5a5 100644
--- a/src/cpu/allwinner/a10/twi.c
+++ b/src/cpu/allwinner/a10/twi.c
@@ -20,12 +20,13 @@
* Largely based on the uboot-sunxi code.
*/

-#include "memmap.h"
-#include "twi.h"
-
#include <device/mmio.h>
#include <delay.h>
#include <device/i2c_simple.h>
+#include <types.h>
+
+#include "memmap.h"
+#include "twi.h"

#define TWI_BASE(n) (A1X_TWI0_BASE + 0x400 * (n))

diff --git a/src/cpu/amd/family_10h-family_15h/init_cpus.c b/src/cpu/amd/family_10h-family_15h/init_cpus.c
index 719d62f..310706b 100644
--- a/src/cpu/amd/family_10h-family_15h/init_cpus.c
+++ b/src/cpu/amd/family_10h-family_15h/init_cpus.c
@@ -17,6 +17,8 @@
#include <console/console.h>
#include <cpu/amd/msr.h>
#include <device/pci_ops.h>
+#include <types.h>
+
#include "init_cpus.h"

#if CONFIG(HAVE_OPTION_TABLE)
diff --git a/src/cpu/amd/family_10h-family_15h/powernow_acpi.c b/src/cpu/amd/family_10h-family_15h/powernow_acpi.c
index d024069..e648b71 100644
--- a/src/cpu/amd/family_10h-family_15h/powernow_acpi.c
+++ b/src/cpu/amd/family_10h-family_15h/powernow_acpi.c
@@ -16,7 +16,6 @@
*/

#include <console/console.h>
-#include <stdint.h>
#include <option.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/msr.h>
@@ -30,6 +29,7 @@
#include <northbridge/amd/amdht/AsPsDefs.h>
#include <northbridge/amd/amdmct/mct/mct.h>
#include <northbridge/amd/amdmct/amddefs.h>
+#include <types.h>

static inline uint8_t is_fam15h(void)
{
diff --git a/src/include/types.h b/src/include/types.h
index b76c95b..d6fdc08 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -15,6 +15,8 @@

#ifndef __TYPES_H
#define __TYPES_H
+
+/* types.h is supposed to provide stdint and stddef defined in here: */
#include <stdint.h>
#include <stddef.h>

diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c
index 0a5d038..c45e131 100644
--- a/src/lib/lzmadecode.c
+++ b/src/lib/lzmadecode.c
@@ -20,7 +20,7 @@
*/

#include "lzmadecode.h"
-#include <stdint.h>
+#include <types.h>

#define kNumTopBits 24
#define kTopValue ((UInt32)1 << kNumTopBits)

To view, visit change 31892. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I57aead27806e307b9827fc7ee2cd663f12ee6e5e
Gerrit-Change-Number: 31892
Gerrit-PatchSet: 19
Gerrit-Owner: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Alexander Couzens <lynxis@fe80.eu>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: David Guckian <david.guckian@intel.com>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Huang Jin <huang.jin@intel.com>
Gerrit-Reviewer: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki@gmail.com>
Gerrit-Reviewer: Lee Leahy <leroy.p.leahy@intel.com>
Gerrit-Reviewer: Lijian Zhao <lijian.zhao@intel.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Gerrit-Reviewer: Philipp Hug <philipp@hug.cx>
Gerrit-Reviewer: Tristan Corrick <tristan@corrick.kiwi>
Gerrit-Reviewer: Vanny E <vanessa.f.eusebio@intel.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh@siemens.com>
Gerrit-Reviewer: York Yang <yyang024@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Reviewer: ron minnich <rminnich@gmail.com>
Gerrit-MessageType: merged