Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68205 )
Change subject: src/device: Clean up includes ......................................................................
src/device: Clean up includes
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: Idd78271f2158bdc29ce9ac8d81f46ad8cbe84c5e --- M src/device/cardbus_device.c M src/device/cpu_device.c M src/device/device_util.c M src/device/dram/spd.c M src/device/gpio.c M src/device/i2c_bus.c M src/device/mmio.c M src/device/oprom/realmode/x86.h M src/device/pci_class.c M src/device/pcix_device.c M src/device/pnp_device.c M src/device/resource_allocator_common.c M src/device/resource_allocator_v4.c 13 files changed, 30 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/68205/1
diff --git a/src/device/cardbus_device.c b/src/device/cardbus_device.c index b014946..23f24dd 100644 --- a/src/device/cardbus_device.c +++ b/src/device/cardbus_device.c @@ -5,6 +5,7 @@ #include <device/pci.h> #include <device/pci_ops.h> #include <device/cardbus.h> +#include <types.h>
/* * I don't think this code is quite correct but it is close. diff --git a/src/device/cpu_device.c b/src/device/cpu_device.c index 4ca5f97..51a1994 100644 --- a/src/device/cpu_device.c +++ b/src/device/cpu_device.c @@ -2,6 +2,7 @@
#include <device/device.h> #include <console/console.h> +#include <stddef.h>
struct device *add_cpu_device(struct bus *cpu_bus, unsigned int apic_id, int enabled) diff --git a/src/device/device_util.c b/src/device/device_util.c index 6919f4b..9beb2ce 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -1,13 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/helpers.h> #include <console/console.h> #include <device/device.h> #include <device/path.h> #include <device/pci_def.h> #include <device/resource.h> -#include <stdbool.h> #include <stdlib.h> #include <string.h> +#include <types.h>
/** * Given a Local APIC ID, find the device structure. diff --git a/src/device/dram/spd.c b/src/device/dram/spd.c index b6246ae..deff674 100644 --- a/src/device/dram/spd.c +++ b/src/device/dram/spd.c @@ -2,6 +2,7 @@
#include <device/dram/spd.h> #include <spd.h> +#include <stddef.h>
const char *spd_manufacturer_name(const uint16_t mod_id) { diff --git a/src/device/gpio.c b/src/device/gpio.c index 5e71497..96cedda 100644 --- a/src/device/gpio.c +++ b/src/device/gpio.c @@ -3,6 +3,7 @@ #include <console/console.h> #include <device/device.h> #include <device/gpio.h> +#include <stddef.h>
const struct gpio_operations *dev_get_gpio_ops(struct device *dev) { diff --git a/src/device/i2c_bus.c b/src/device/i2c_bus.c index f0d7dd1..361bb67 100644 --- a/src/device/i2c_bus.c +++ b/src/device/i2c_bus.c @@ -1,10 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <stdint.h> +#include <commonlib/bsd/helpers.h> #include <console/console.h> +#include <device/device.h> #include <device/smbus.h> #include <device/i2c_bus.h> #include <commonlib/endian.h> +#include <types.h>
bool i2c_dev_detect(struct device *dev, unsigned int addr) { diff --git a/src/device/mmio.c b/src/device/mmio.c index de8c8d3..b62805a 100644 --- a/src/device/mmio.c +++ b/src/device/mmio.c @@ -1,7 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <assert.h> +#include <commonlib/bsd/helpers.h> #include <device/mmio.h> +#include <types.h>
/* Helper functions for various MMIO access patterns. */
diff --git a/src/device/oprom/realmode/x86.h b/src/device/oprom/realmode/x86.h index 36a28af..b0efe90 100644 --- a/src/device/oprom/realmode/x86.h +++ b/src/device/oprom/realmode/x86.h @@ -4,6 +4,7 @@ #define __DEVICE_OPROM_REALMODE_X86_H__
#include <arch/cpu.h> +#include <stdint.h>
#define REALMODE_BASE ((void *)0x600)
diff --git a/src/device/pci_class.c b/src/device/pci_class.c index 460d853..c5630f7 100644 --- a/src/device/pci_class.c +++ b/src/device/pci_class.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/helpers.h> #include <device/device.h> #include <device/pci.h> #include <device/pci_ops.h> +#include <stddef.h>
typedef struct { const unsigned char subclass_id; diff --git a/src/device/pcix_device.c b/src/device/pcix_device.c index 8bf5225..5593357f 100644 --- a/src/device/pcix_device.c +++ b/src/device/pcix_device.c @@ -5,6 +5,7 @@ #include <device/pci.h> #include <device/pci_ops.h> #include <device/pcix.h> +#include <stdint.h>
static void pcix_tune_dev(struct device *dev) { diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c index 85daec7..9405d88 100644 --- a/src/device/pnp_device.c +++ b/src/device/pnp_device.c @@ -1,10 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <console/console.h> -#include <stdint.h> #include <arch/io.h> +#include <console/console.h> #include <device/device.h> #include <device/pnp.h> +#include <stdint.h>
/* PNP config mode wrappers */
diff --git a/src/device/resource_allocator_common.c b/src/device/resource_allocator_common.c index 1cb1895..fe1aae3 100644 --- a/src/device/resource_allocator_common.c +++ b/src/device/resource_allocator_common.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <device/device.h> +#include <stddef.h>
struct pick_largest_state { struct resource *last; diff --git a/src/device/resource_allocator_v4.c b/src/device/resource_allocator_v4.c index 222f1e9..6e4aa5e 100644 --- a/src/device/resource_allocator_v4.c +++ b/src/device/resource_allocator_v4.c @@ -1,9 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/helpers.h> #include <console/console.h> #include <device/device.h> #include <memrange.h> #include <post.h> +#include <types.h>
static const char *resource2str(const struct resource *res) {